You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Having inner classes inside the test and the ValueProviderExtension is been declared on the top-level class, e.g.:
@ExtendWith(ValueProviderExtension.class)
class MyTestClass {
@Nested
class MyInnerTestClass1 {
@Test
void test() {
}
}
@Nested
class MyInnerTestClass2 {
@Test
void test() {
}
}
}
Then the following exception is been thrown:
java.lang.IllegalStateException: Illegal transition, cannot switch from DEFAULT back to TEST_CLASS
at com.google.common.base.Preconditions.checkState(Preconditions.java:836)
at com.tngtech.valueprovider.ValueProviderFactory.checkMayFinish(ValueProviderFactory.java:90)
at com.tngtech.valueprovider.ValueProviderFactory.doFinishTestClassCycle(ValueProviderFactory.java:62)
at com.tngtech.valueprovider.ValueProviderFactory.finishTestClassCycle(ValueProviderFactory.java:152)
at com.tngtech.valueprovider.ValueProviderExtension.finishTestClassCycle(ValueProviderExtension.java:115)
at com.tngtech.valueprovider.ValueProviderExtension.afterAll(ValueProviderExtension.java:99)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
The text was updated successfully, but these errors were encountered:
Thank you for bringing this deficiency up, @yobinx, and please forgive me for my late response.
According to my first, admittedly rough analysis, adding support for @Nested inner test classes should be possible.
I will get back to you as soon as I have a working solution.
Having inner classes inside the test and the ValueProviderExtension is been declared on the top-level class, e.g.:
Then the following exception is been thrown:
The text was updated successfully, but these errors were encountered: