コード例 #1
0
  @Test
  public void shouldLookForSavedResourcesUsingVisitor() throws CoreException {
    IResourceDelta delta = mock(IResourceDelta.class);

    assertFalse(detector.canProcessEvent(buildEventWith(delta)));

    verify(delta).accept(any(DeltaVisitor.class), eq(true));
  }
コード例 #2
0
  @Test
  public void shouldNotifyListenerWhenSavedResourceIsFound() throws CoreException {
    SaveListener listener = mock(SaveListener.class);

    detector = new SaveDetector(listener);
    detector.processEvent(null);

    verify(listener).filesSaved();
  }