use of org.mule.runtime.module.artifact.builder.TestArtifactDescriptor in project mule by mulesoft.
the class ApplicationDeploymentTestCase method deploysAppProvidingResourceForPlugin.
@Test
public void deploysAppProvidingResourceForPlugin() throws Exception {
File resourceConsumerClassFile = new CompilerUtils.SingleClassCompiler().compile(getResourceFile("/org/foo/resource/ResourceConsumer.java"));
final ArtifactPluginFileBuilder pluginUsingAppResource = new ArtifactPluginFileBuilder("appResourcePlugin").configuredWith(EXPORTED_CLASS_PACKAGES_PROPERTY, "org.foo.resource").containingClass(resourceConsumerClassFile, "org/foo/resource/ResourceConsumer.class");
final TestArtifactDescriptor artifactFileBuilder = new ApplicationFileBuilder("appProvidingResourceForPlugin").definedBy("app-providing-resource-for-plugin.xml").dependingOn(pluginUsingAppResource).configuredWith(EXPORTED_RESOURCES, "META-INF/app-resource.txt").usingResource(getResourceFile("/test-resource.txt").toString(), "META-INF/app-resource.txt");
addPackedAppFromBuilder(artifactFileBuilder);
startDeployment();
assertDeploymentSuccess(applicationDeploymentListener, artifactFileBuilder.getId());
executeApplicationFlow("main");
}
Aggregations