use of com.carrotsearch.randomizedtesting.WithNestedTestClass.FullResult in project randomizedtesting by randomizedtesting.
the class TestHookMethodOrderWithExceptions method checkOrderSameAsJUnit.
@Test
@Repeat(iterations = 20)
public void checkOrderSameAsJUnit() throws Exception {
long seed = RandomizedContext.current().getRandomness().getSeed();
callOrder.clear();
Super.rnd = new Random(seed);
FullResult r1 = WithNestedTestClass.runTests(WithRegularRunner.class);
List<String> junitOrder = new ArrayList<String>(callOrder);
callOrder.clear();
Super.rnd = new Random(seed);
FullResult r2 = WithNestedTestClass.runTests(WithRandomizedRunner.class);
List<String> rrunnerOrder = new ArrayList<String>(callOrder);
Assert.assertEquals(junitOrder, rrunnerOrder);
Assertions.assertThat(r1.getRunCount()).isEqualTo(r2.getRunCount());
}
Aggregations