Search in sources :

Example 1 with SourceFileTraversal

use of org.eclipse.mylyn.wikitext.maven.internal.SourceFileTraversal in project mylyn.docs by eclipse.

the class SourceFileTraversalTest method traverseRootMatch.

@Test
public void traverseRootMatch() {
    File file = mockFile("one.Test");
    SourceFileTraversal traversal = new SourceFileTraversal(mockFolder("test", file));
    Visitor visitor = mock(Visitor.class);
    traversal.traverse(visitor);
    verify(visitor).accept(eq(""), same(file));
    verifyNoMoreInteractions(visitor);
}
Also used : Visitor(org.eclipse.mylyn.wikitext.maven.internal.SourceFileTraversal.Visitor) SourceFileTraversal(org.eclipse.mylyn.wikitext.maven.internal.SourceFileTraversal) File(java.io.File) Test(org.junit.Test)

Example 2 with SourceFileTraversal

use of org.eclipse.mylyn.wikitext.maven.internal.SourceFileTraversal in project mylyn.docs by eclipse.

the class SourceFileTraversalTest method traverseMatchWithPath.

@Test
public void traverseMatchWithPath() {
    File file = mockFile("one.Test");
    SourceFileTraversal traversal = new SourceFileTraversal(mockFolder("test", mockFolder("depth1", mockFolder("depth2", file))));
    Visitor visitor = mock(Visitor.class);
    traversal.traverse(visitor);
    verify(visitor).accept(eq("depth1" + File.separator + "depth2"), same(file));
    verifyNoMoreInteractions(visitor);
}
Also used : Visitor(org.eclipse.mylyn.wikitext.maven.internal.SourceFileTraversal.Visitor) SourceFileTraversal(org.eclipse.mylyn.wikitext.maven.internal.SourceFileTraversal) File(java.io.File) Test(org.junit.Test)

Aggregations

File (java.io.File)2 SourceFileTraversal (org.eclipse.mylyn.wikitext.maven.internal.SourceFileTraversal)2 Visitor (org.eclipse.mylyn.wikitext.maven.internal.SourceFileTraversal.Visitor)2 Test (org.junit.Test)2