@Test public void shouldKeepLookingIfResourceIsNotAFile() throws CoreException { when(resource.isDerived()).thenReturn(false); when(resource.getType()).thenReturn(IResource.FOLDER); assertTrue(deltaVisitor.visit(resourceDelta(CONTENT))); assertFalse(deltaVisitor.savedResourceFound()); }
@Test public void shouldDetectNonDerivedResources() throws CoreException { when(resource.getType()).thenReturn(IResource.FILE); when(resource.isDerived()).thenReturn(false); assertFalse(deltaVisitor.visit(resourceDelta(CONTENT))); assertTrue(deltaVisitor.savedResourceFound()); }