public void testAddModuleSourceFileSets_ShouldAddOneSourceDirectory()
throws ArchiveCreationException, AssemblyFormattingException
{
final MockManager mm = new MockManager();
final MockAndControlForAddFileSetsTask macTask = new MockAndControlForAddFileSetsTask( mm, fileManager );
final MavenProject project = createProject( "group", "artifact", "version", null );
macTask.expectGetProject( project );
final ArtifactMock artifactMock = new ArtifactMock( mm, "group", "artifact", "version", "jar", false );
project.setArtifact( artifactMock.getArtifact() );
final Set<MavenProject> projects = Collections.singleton( project );
final ModuleSources sources = new ModuleSources();
final FileSet fs = new FileSet();
fs.setDirectory( "/src" );
fs.setDirectoryMode( "777" );
fs.setFileMode( "777" );
sources.addFileSet( fs );
macTask.expectGetArchiveBaseDirectory();
final int mode = TypeConversionUtils.modeToInt( "777", new ConsoleLogger( Logger.LEVEL_DEBUG, "test" ) );
final int[] modes = { -1, -1, mode, mode };
macTask.expectAdditionOfSingleFileSet( project, project.getBasedir(), "final-name", false, modes, 1, true,
false );
mm.replayAll();
final Logger logger = new ConsoleLogger( Logger.LEVEL_DEBUG, "test" );