use of org.mule.runtime.module.deployment.impl.internal.builder.ApplicationFileBuilder in project mule by mulesoft.
the class DomainDeploymentTestCase method deploysDomainWithSharedLibPrecedenceOverApplicationLib.
@Test
public void deploysDomainWithSharedLibPrecedenceOverApplicationLib() throws Exception {
final String domainId = "shared-lib";
final DomainFileBuilder domainFileBuilder = new DomainFileBuilder(domainId).dependingOnSharedLibrary(new JarFileBuilder("barUtils1_0", barUtils1_0JarFile)).definedBy("empty-domain-config.xml");
final ApplicationFileBuilder applicationFileBuilder = new ApplicationFileBuilder("shared-lib-precedence-app").definedBy("app-shared-lib-precedence-config.xml").dependingOnSharedLibrary(new JarFileBuilder("barUtils2_0", barUtils2_0JarFile)).containingClass(pluginEcho1TestClassFile, "org/foo/Plugin1Echo.class").dependingOn(domainFileBuilder);
addPackedDomainFromBuilder(domainFileBuilder);
addPackedAppFromBuilder(applicationFileBuilder);
startDeployment();
assertDeploymentSuccess(domainDeploymentListener, domainFileBuilder.getId());
assertApplicationDeploymentSuccess(applicationDeploymentListener, applicationFileBuilder.getId());
executeApplicationFlow("main");
}
use of org.mule.runtime.module.deployment.impl.internal.builder.ApplicationFileBuilder in project mule by mulesoft.
the class DomainDeploymentTestCase method deploysAppUsingDomainExtension.
@Test
public void deploysAppUsingDomainExtension() throws Exception {
installEchoService();
installFooService();
DomainFileBuilder domainFileBuilder = new DomainFileBuilder("dummy-domain-bundle").definedBy("empty-domain-config.xml").dependingOn(helloExtensionV1Plugin);
ApplicationFileBuilder applicationFileBuilder = new ApplicationFileBuilder("appWithHelloExtension").definedBy(APP_WITH_EXTENSION_PLUGIN_CONFIG).dependingOn(domainFileBuilder);
addPackedDomainFromBuilder(domainFileBuilder);
addPackedAppFromBuilder(applicationFileBuilder);
startDeployment();
assertDeploymentSuccess(domainDeploymentListener, domainFileBuilder.getId());
assertDeploymentSuccess(applicationDeploymentListener, applicationFileBuilder.getId());
executeApplicationFlow("main");
}
use of org.mule.runtime.module.deployment.impl.internal.builder.ApplicationFileBuilder in project mule by mulesoft.
the class DomainDeploymentTestCase method pluginFromDomainUsedInApp.
@Test
public void pluginFromDomainUsedInApp() throws Exception {
addPackedDomainFromBuilder(exceptionThrowingPluginImportingDomain);
ApplicationFileBuilder applicationFileBuilder = createExtensionApplicationWithServices("exception-throwing-app.xml").dependingOn(exceptionThrowingPluginImportingDomain);
addPackedAppFromBuilder(applicationFileBuilder);
startDeployment();
try {
executeApplicationFlow("main");
fail("Flow execution was expected to throw an exception");
} catch (MuleRuntimeException expected) {
assertThat(expected.getCause().getCause().getClass().getName(), is(equalTo("org.exception.CustomException")));
}
}
use of org.mule.runtime.module.deployment.impl.internal.builder.ApplicationFileBuilder in project mule by mulesoft.
the class DomainDeploymentTestCase method deploysAppUsingDomainPlugin.
@Test
public void deploysAppUsingDomainPlugin() throws Exception {
DomainFileBuilder domainFileBuilder = new DomainFileBuilder("dummy-domain-bundle").definedBy("empty-domain-config.xml").dependingOn(echoPlugin);
ApplicationFileBuilder echoPluginAppFileBuilder = new ApplicationFileBuilder("dummyWithEchoPlugin").definedBy("app-with-echo-plugin-config.xml").dependingOn(domainFileBuilder);
addPackedDomainFromBuilder(domainFileBuilder);
addPackedAppFromBuilder(echoPluginAppFileBuilder);
startDeployment();
assertDeploymentSuccess(domainDeploymentListener, domainFileBuilder.getId());
assertDeploymentSuccess(applicationDeploymentListener, echoPluginAppFileBuilder.getId());
executeApplicationFlow("main");
}
Aggregations