use of spoon.support.compiler.VirtualFolder in project spoon by INRIA.
the class ResourceTest method testVirtualFolder.
@Test
public void testVirtualFolder() throws Exception {
String dir = "src/test/resources/spoon/test/api/";
FileSystemFolder fileSystemFolder = new FileSystemFolder(new File(dir));
String dir2 = "src/test/resources/spoon/test/exceptions/";
FileSystemFolder fileSystemFolder2 = new FileSystemFolder(new File(dir2));
SpoonFolder folder = new VirtualFolder();
folder.addFolder(fileSystemFolder);
folder.addFolder(fileSystemFolder2);
assertEquals(4, folder.getAllFiles().size());
// the README is not a Java file
assertEquals(3, folder.getAllJavaFiles().size());
}
Aggregations