use of org.guvnor.common.services.project.model.Dependency in project kie-wb-common by kiegroup.
the class DependencyServiceImplTest method testNoDependencies.
@Test
public void testNoDependencies() throws Exception {
GAV gav = new GAV("artifactID", "groupID", "version");
Collection<Dependency> dependencies = service.loadDependencies(gav);
assertTrue(dependencies.isEmpty());
}
use of org.guvnor.common.services.project.model.Dependency in project kie-wb-common by kiegroup.
the class PackageNameSearchProviderTest method testLoadTopLevelDependencies.
@Test
public void testLoadTopLevelDependencies() throws Exception {
POM pom = new POM(new GAV("artifactID", "groupID", "version"));
pom.getDependencies().add(getDependency("drools-core", "org.drools", "6.3.0"));
pom.getDependencies().add(getDependency("junit", "org.junit", "4.11"));
HashMap<Dependency, Set<String>> map = setUpDependencyService(pom);
map.put(getGAV("drools-core", "org.drools", "6.3.0"), toSet("org.drools.a", "org.drools.b", "org.drools.c"));
map.put(getGAV("junit", "org.junit", "4.11"), toSet("junit.a", "junit.b"));
Set<String> packageNames = packageNameSearchProvider.newTopLevelPackageNamesSearch(pom).search();
assertEquals(5, packageNames.size());
assertTrue(packageNames.contains("org.drools.a"));
assertTrue(packageNames.contains("org.drools.b"));
assertTrue(packageNames.contains("org.drools.c"));
assertTrue(packageNames.contains("junit.a"));
assertTrue(packageNames.contains("junit.b"));
}
Aggregations