When I try to execute the below simplified JUnit test, it succeeds but i am getting an error message: Notifications are not supported when all test-instances are created first!
@RunWith(PowerMockRunner.class)
@PowerMockRunnerDelegate(BlockJUnit4ClassRunner.class)
@PrepareForTest({ A.class })
public class TestA extends TestB {
@Test
public void test() throws Exception {
assertEquals(true, true);
}
}
public class TestB {}
public class A {}
When I remove the @PowerMockRunnerDelegate(BlockJUnit4ClassRunner.class), OR the extends TestB OR the @PrepareForTest({ A.class }), the message disappears. Even an emtpy @PrepareForTest({ }) makes the error message appear.
I found this post, but it is not the same problem, because I am not using an extended BlockJUnit4ClassRunner.
I am trying to understand why this error message appears.
I am using the latest version of Powermock (1.6.6) and JUnit 4.12 and running the test using java8.
Best Regards,
--
You received this message because you are subscribed to the Google Groups "PowerMock" group.
To unsubscribe from this group and stop receiving emails from it, send an email to powermock+...@googlegroups.com.
To post to this group, send email to powe...@googlegroups.com.
Visit this group at https://groups.google.com/group/powermock.
For more options, visit https://groups.google.com/d/optout.