@Test public void testsRunInParallel() { Result result = JUnitCore.runClasses(ParallelComputer.methods(), Example.class); assertTrue(result.wasSuccessful()); assertNotNull(fOne); assertNotNull(fTwo); assertThat(fOne, is(not(fTwo))); }
@Test public void testsRunInParallel() { Result result = JUnitCore.runClasses(ParallelComputer.classes(), Example1.class, Example2.class); assertTrue(result.wasSuccessful()); assertNotNull(fExample1One); assertNotNull(fExample1Two); assertNotNull(fExample2One); assertNotNull(fExample2Two); assertThat(fExample1One, is(fExample1Two)); assertThat(fExample2One, is(fExample2Two)); assertThat(fExample1One, is(not(fExample2One))); }