use of org.powermock.modules.junit4.PowerMockRunner in project powermock by powermock.
the class GitHub352Test method testCountShouldBe3WhenRunWithPowerMockRunner.
@Test
public void testCountShouldBe3WhenRunWithPowerMockRunner() {
JUnitCore jUnitCore = new JUnitCore();
Request request = new Request() {
@Override
public Runner getRunner() {
try {
return new PowerMockRunner(MyTest.class);
} catch (Exception e) {
throw new RuntimeException(e);
}
}
};
Result result = jUnitCore.run(request);
int testCount = result.getRunCount();
assertThat(testCount).describedAs("Test count not match to expected.", 3).isEqualTo(3);
}
Aggregations