use of org.mule.runtime.module.deployment.internal.util.ObservableList in project mule by mulesoft.
the class DefaultArchiveDeployerTestCase method ignoresErrorsWhileRemovingArtifactDataFolder.
@Test
public void ignoresErrorsWhileRemovingArtifactDataFolder() throws Exception {
AbstractDeployableArtifactFactory artifactFactory = mock(AbstractDeployableArtifactFactory.class);
ArtifactDeployer artifactDeployer = mock(ArtifactDeployer.class);
DefaultArchiveDeployer<Application> deployer = new DefaultArchiveDeployer(artifactDeployer, artifactFactory, new ObservableList(), null, null);
deployer.setDeploymentListener(mock(DeploymentListener.class));
deployer.deployArtifact(createMockApplication(), empty());
mockStatic(FileUtils.class);
PowerMockito.doThrow(new IOException()).when(FileUtils.class);
deleteDirectory(Matchers.eq(getAppDataFolder(ARTIFACT_ID)));
deployer.undeployArtifact(ARTIFACT_ID);
}
Aggregations