use of org.mule.runtime.module.deployment.api.DeploymentService in project mule by mulesoft.
the class DefaultMuleCoreExtensionManagerTestCase method assertArtifactDeploymentListener.
private void assertArtifactDeploymentListener(ArtifactDeploymentListener extension) throws Exception {
List<MuleCoreExtension> extensions = new LinkedList<>();
extensions.add((MuleCoreExtension) extension);
when(coreExtensionDiscoverer.discover()).thenReturn(extensions);
when(coreExtensionDependencyResolver.resolveDependencies(extensions)).thenReturn(extensions);
DeploymentService deploymentService = mock(DeploymentService.class);
TestMuleCoreExtensionManager testCoreExtensionManager = new TestMuleCoreExtensionManager(coreExtensionDiscoverer, coreExtensionDependencyResolver);
testCoreExtensionManager.setDeploymentService(deploymentService);
testCoreExtensionManager.initialise();
verify(deploymentService).addDomainDeploymentListener(testCoreExtensionManager.domainDeploymentListener);
verify(deploymentService).addDeploymentListener(testCoreExtensionManager.applicationDeploymentListener);
}
Aggregations