I'm trying to migrate test framework from JUnit 5 to kotest.
I selected Annotation Spec at first (to check compatibility), but Nested Annotation doesn't work as expected
Sample code is below
class Outside : AnnotationSpec() {
@Test
fun runOutside() { }
@Nested
inner class Inside() {
@Test
fun runInside() { }
}
}
runOutside
runs well, but runInside
doesn't. The error message is java.lang.IllegalArgumentException: object is not an instance of declaring class
What's wrong ? is this a bug ?