@Test public void shouldReturnTheNumberOfTestsRun() { JavaClass javaClass = mock(JavaClass.class); testsToExpect(javaClass); assertEquals(1, core.update(updatedFiles)); }
@Before public void inContext() { updatedFiles = newArrayList(); core = new DefaultInfinitestCore(mock(TestRunner.class), new ControlledEventQueue()); testDetector = mock(TestDetector.class); when(testDetector.getCurrentTests()).thenReturn(Collections.<String>emptySet()); core.setTestDetector(testDetector); }
@Test public void canUseAKnownListOfChangedFilesToReduceFileSystemAccess() { testsToExpect(); core.update(updatedFiles); }