@Test public void shouldLookForSavedResourcesUsingVisitor() throws CoreException { IResourceDelta delta = mock(IResourceDelta.class); assertFalse(detector.canProcessEvent(buildEventWith(delta))); verify(delta).accept(any(DeltaVisitor.class), eq(true)); }
@Test public void shouldNotifyListenerWhenSavedResourceIsFound() throws CoreException { SaveListener listener = mock(SaveListener.class); detector = new SaveDetector(listener); detector.processEvent(null); verify(listener).filesSaved(); }