folder+"fileInFolder.txt",
folder+"ignoreFileInFolder.txt",
folder+"otherFileInFolder.txt"));
DummyResourceImporter importer = new DummyResourceImporter(
expectedFolderResources);
ResourceLoader loader = new ResourceLoader(importer, false, false);
loader.addResource(new File(rootDir,"testFolder"));
assertEquals(expectedFolderResources, loader.getResources(ResourceState.REGISTERED));
assertTrue(loader.getResources(ResourceState.ERROR).isEmpty());
assertTrue(loader.getResources(ResourceState.LOADED).isEmpty());
assertTrue(loader.getResources(ResourceState.IGNORED).isEmpty());
loader.loadResources();
assertEquals(new HashSet<String>(Arrays.asList(
folder+"archiveInFolder.zip", folder+"fileInFolder.txt",
folder+"otherFileInFolder.txt",folder+"archiveWithIgnore.zip",
folder+"archiveWithError.zip")),
loader.getResources(ResourceState.LOADED));
assertTrue(loader.getResources(ResourceState.REGISTERED).isEmpty());
assertEquals(new HashSet<String>(Arrays.asList(
folder+"errorFileInFolder.txt")),
loader.getResources(ResourceState.ERROR));
assertEquals(new HashSet<String>(Arrays.asList(
folder+"ignoreFileInFolder.txt")),
loader.getResources(ResourceState.IGNORED));
}