ModuleFinder { public Set<Module> find(final ResourceResolver resourceResolver, final Branch branch) { this.resourceResolver = checkNotNull("resourceResolver", resourceResolver); return new Finder(checkNotNull("branch", branch)).find(); } ModuleFinder(); @Inject  ModuleFinder(final @Named("ioStrategy") IOService ioService,
                        final POMService pomService); Set<Module> find(final ResourceResolver resourceResolver,
                            final Branch branch);  }
@Test public void pomIsInPathRoot() throws Exception { final Path folderPath = ioService.get(this.getClass().getResource("/LegacyRepositoryStructure/Project1/").toURI()); final Set<Module> modules = finder.find(getResourceResolver(), new Branch("master", Paths.convert(folderPath))); assertFalse(modules.isEmpty()); }
@Test public void modulesAreInFolders() throws Exception { final Path folderPath = ioService.get(this.getClass().getResource("/LegacyRepositoryStructure/").toURI()); final Set<Module> modules = finder.find(getResourceResolver(), new Branch("master", Paths.convert(folderPath))); assertEquals(2, modules.size()); }