public void test_getModuleSetResolutionRequirements()
throws DependencyResolutionException
{
final EasyMockSupport mm = new EasyMockSupport();
final AssemblerConfigurationSource cs = mm.createMock( AssemblerConfigurationSource.class );
final File rootDir = new File( "root" );
final MavenProject project = createMavenProject( "main-group", "main-artifact", "1", rootDir );
final File module1Dir = new File( rootDir, "module-1" );
final MavenProject module1 = createMavenProject( "main-group", "module-1", "1", module1Dir );
final MavenProject module1a =
createMavenProject( "group1", "module-1a", "1", new File( module1Dir, "module-1a" ) );
final MavenProject module1b =
createMavenProject( "group1.b", "module-1b", "1", new File( module1Dir, "module-1b" ) );
module1.getModel().addModule( module1a.getArtifactId() );
module1.getModel().addModule( module1b.getArtifactId() );
final File module2Dir = new File( rootDir, "module-2" );
final MavenProject module2 = createMavenProject( "main-group", "module-2", "1", module2Dir );
final MavenProject module2a =
createMavenProject( "main-group", "module-2a", "1", new File( module2Dir, "module-2a" ) );
module2.getModel().addModule( module2a.getArtifactId() );
project.getModel().addModule( module1.getArtifactId() );
project.getModel().addModule( module2.getArtifactId() );
final List<MavenProject> allProjects = new ArrayList<MavenProject>();
allProjects.add( project );
allProjects.add( module1 );
allProjects.add( module1a );
allProjects.add( module1b );
allProjects.add( module2 );
allProjects.add( module2a );
expect( cs.getReactorProjects()).andReturn( allProjects ).anyTimes();
expect( cs.getProject()).andReturn( project ).anyTimes();
final ResolutionManagementInfo info = new ResolutionManagementInfo( project );
final List<ModuleSet> moduleSets = new ArrayList<ModuleSet>();