use of io.qameta.allure.Description in project mule by mulesoft.
the class ApplicationDeploymentTestCase method deploysAppWithInterceptorsAndNotExportedPackage.
@Test
@Issue("MULE-13756")
@Description("Tests that code called form application's ProcessorInterceptor can access internal resources/packages of the application")
public void deploysAppWithInterceptorsAndNotExportedPackage() throws Exception {
File loadsOwnResourceInterceptorFactoryClassFile = new SingleClassCompiler().compile(getResourceFile("/org/foo/LoadsOwnResourceInterceptorFactory.java"));
File loadsOwnResourceInterceptorClassFile = new SingleClassCompiler().compile(getResourceFile("/org/foo/LoadsOwnResourceInterceptor.java"));
ApplicationFileBuilder nonExposingAppFileBuilder = new ApplicationFileBuilder("non-exposing-app").configuredWith(EXPORTED_PACKAGES, "org.bar1").configuredWith(EXPORTED_RESOURCES, "test-resource.txt").definedBy("app-with-interceptor.xml").containingClass(loadsOwnResourceInterceptorFactoryClassFile, "org/foo/LoadsOwnResourceInterceptorFactory.class").containingClass(loadsOwnResourceInterceptorClassFile, "org/foo/LoadsOwnResourceInterceptor.class").containingClass(barUtils1ClassFile, "org/bar1/BarUtils.class").containingClass(barUtils2ClassFile, "org/bar2/BarUtils.class").containingResource("test-resource.txt", "test-resource.txt").containingResource("test-resource.txt", "test-resource-not-exported.txt");
addPackedAppFromBuilder(nonExposingAppFileBuilder);
startDeployment();
assertApplicationDeploymentSuccess(applicationDeploymentListener, nonExposingAppFileBuilder.getId());
executeApplicationFlow("main");
}
use of io.qameta.allure.Description in project mule by mulesoft.
the class ExtensionsClientTestCase method executeOperationWithNullSafeParameter.
@Test
@Description("Executes an operation that has a @NullSafe annotated parameter using the client and checks the output")
public void executeOperationWithNullSafeParameter() throws Throwable {
OperationParameters params = builder().configName("banana").build();
Result<VeganPolicy, Object> result = doExecute(VEGAN, "applyPolicy", params);
assertThat(result.getOutput().getMeetAllowed(), is(false));
assertThat(result.getOutput().getIngredients().getSaltMiligrams(), is(0));
}
use of io.qameta.allure.Description in project mule by mulesoft.
the class ExtensionsClientTestCase method executeOperationThatReturnsAttributes.
@Test
@Description("Executes an operation that returns attributes metadata using the client and checks the output and the attributes")
public void executeOperationThatReturnsAttributes() throws Throwable {
OperationParameters params = builder().configName(HEISENBERG_CONFIG).build();
Result<String, IntegerAttributes> result = doExecute(HEISENBERG_EXT_NAME, "getEnemy", params);
assertThat(result.getOutput(), is("Gustavo Fring"));
assertThat(result.getAttributes().isPresent(), is(true));
assertThat(result.getAttributes().get().getValue(), is(0));
}
use of io.qameta.allure.Description in project mule by mulesoft.
the class ExtensionsClientTestCase method executeSimpleOperationWithExpression.
@Test
@Description("Executes a simple operation with an expression as parameter using the client and checks the output")
public void executeSimpleOperationWithExpression() throws Throwable {
OperationParameters params = builder().configName(HEISENBERG_CONFIG).addParameter("victim", "#[mel:'Juani']").addParameter("goodbyeMessage", "ADIOS").build();
Result<String, Object> result = doExecute(HEISENBERG_EXT_NAME, "kill", params);
assertThat(result.getOutput(), is("ADIOS, Juani"));
}
use of io.qameta.allure.Description in project mule by mulesoft.
the class ExtensionsClientTestCase method executeFailureOperation.
@Test
@Description("Executes an operation that fails using the client and checks the throwed exception")
public void executeFailureOperation() throws Throwable {
exception.expect(MuleException.class);
exception.expectCause(instanceOf(ConnectionException.class));
exception.expectMessage("You are not allowed to speak with gus.");
OperationParameters params = builder().configName(HEISENBERG_CONFIG).build();
doExecute(HEISENBERG_EXT_NAME, "callGusFring", params);
}
Aggregations