@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" ) ); }
public PackageNameSearch newTopLevelPackageNamesSearch( final POM pom ) { return new PackageNameSearch( pom ); }
PackageNameSearchProvider { public PackageNameSearch newTopLevelPackageNamesSearch( final POM pom ) { return new PackageNameSearch( pom ); } }
PackageNameSearchProvider { public PackageNameSearch newTopLevelPackageNamesSearch( final POM pom ) { return new PackageNameSearch( pom ); } PackageNameSearchProvider(); @Inject  PackageNameSearchProvider( final DependencyService dependencyService ); }
PackageNameSearchProvider { public PackageNameSearch newTopLevelPackageNamesSearch( final POM pom ) { return new PackageNameSearch( pom ); } PackageNameSearchProvider(); @Inject  PackageNameSearchProvider( final DependencyService dependencyService ); PackageNameSearch newTopLevelPackageNamesSearch( final POM pom ); }
PackageNameSearchProvider { public PackageNameSearch newTopLevelPackageNamesSearch( final POM pom ) { return new PackageNameSearch( pom ); } PackageNameSearchProvider(); @Inject  PackageNameSearchProvider( final DependencyService dependencyService ); PackageNameSearch newTopLevelPackageNamesSearch( final POM pom );  }