use of org.apache.maven.plugins.assembly.archive.phase.AssemblyArchiverPhase in project maven-plugins by apache.
the class DefaultAssemblyArchiverTest method testCreateArchiver_ShouldCreateZipArchiver.
@Test
public void testCreateArchiver_ShouldCreateZipArchiver() throws NoSuchArchiverException, ArchiverException {
final EasyMockSupport mm = new EasyMockSupport();
final ZipArchiver archiver = new ZipArchiver();
final MockAndControlForAssemblyArchiver macArchiverManager = new MockAndControlForAssemblyArchiver(mm);
macArchiverManager.expectGetArchiver("zip", archiver);
final AssemblerConfigurationSource configSource = mm.createMock(AssemblerConfigurationSource.class);
expect(configSource.isDryRun()).andReturn(false).anyTimes();
expect(configSource.getArchiverConfig()).andReturn(null).anyTimes();
expect(configSource.getWorkingDirectory()).andReturn(new File(".")).anyTimes();
expect(configSource.isUpdateOnly()).andReturn(false).anyTimes();
expect(configSource.getJarArchiveConfiguration()).andReturn(null).anyTimes();
expect(configSource.isIgnorePermissions()).andReturn(true).anyTimes();
mm.replayAll();
final DefaultAssemblyArchiver subject = createSubject(macArchiverManager, new ArrayList<AssemblyArchiverPhase>(), null);
subject.createArchiver("zip", false, null, configSource, null, false, null);
}
use of org.apache.maven.plugins.assembly.archive.phase.AssemblyArchiverPhase in project maven-plugins by apache.
the class DefaultAssemblyArchiverTest method setupStdExpectations.
private DefaultAssemblyArchiver setupStdExpectations(EasyMockSupport mm, MockAndControlForAssemblyArchiver macArchiverManager, AssemblerConfigurationSource configSource) {
expect(configSource.getProject()).andReturn(new MavenProject(new Model())).anyTimes();
expect(configSource.getJarArchiveConfiguration()).andReturn(null).anyTimes();
expect(configSource.getWorkingDirectory()).andReturn(new File(".")).anyTimes();
expect(configSource.isUpdateOnly()).andReturn(false).anyTimes();
expect(configSource.isIgnorePermissions()).andReturn(true).anyTimes();
mm.replayAll();
return createSubject(macArchiverManager, new ArrayList<AssemblyArchiverPhase>(), null);
}
Aggregations