Search in sources :

Example 1 with DeploymentService

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);
}
Also used : DeploymentService(org.mule.runtime.module.deployment.api.DeploymentService) MuleCoreExtension(org.mule.runtime.container.api.MuleCoreExtension) LinkedList(java.util.LinkedList)

Aggregations

LinkedList (java.util.LinkedList)1 MuleCoreExtension (org.mule.runtime.container.api.MuleCoreExtension)1 DeploymentService (org.mule.runtime.module.deployment.api.DeploymentService)1