use of org.mule.runtime.module.deployment.impl.internal.builder.ArtifactPluginFileBuilder in project mule by mulesoft.
the class ApplicationPolicyDeploymentTestCase method appliesApplicationPolicyIncludingPlugin.
@Test
public void appliesApplicationPolicyIncludingPlugin() throws Exception {
ArtifactPluginFileBuilder simpleExtensionPlugin = createSingleExtensionPlugin();
policyManager.registerPolicyTemplate(policyIncludingPluginFileBuilder.getArtifactFile());
ApplicationFileBuilder applicationFileBuilder = createExtensionApplicationWithServices(APP_WITH_SIMPLE_EXTENSION_CONFIG, simpleExtensionPlugin);
addPackedAppFromBuilder(applicationFileBuilder);
startDeployment();
assertApplicationDeploymentSuccess(applicationDeploymentListener, applicationFileBuilder.getId());
policyManager.addPolicy(applicationFileBuilder.getId(), policyIncludingPluginFileBuilder.getArtifactId(), new PolicyParametrization(FOO_POLICY_ID, s -> true, 1, emptyMap(), getResourceFile("/appPluginPolicy.xml"), emptyList()));
executeApplicationFlow("main");
assertThat(invocationCount, equalTo(1));
}
Aggregations