use of io.qameta.allure.Description in project mule by mulesoft.
the class DefaultExpressionManagerMelDefaultTestCase method parse.
@Test
@Description("Verifies that parsing works for plain String scenarios.")
public void parse() throws MuleException {
String expression = "this is a test";
assertThat(expressionManager.parse(expression, testEvent(), TEST_CONNECTOR_LOCATION), is(expression));
}
use of io.qameta.allure.Description in project mule by mulesoft.
the class DefaultExpressionManagerMelDefaultTestCase method map.
@Test
@Description("Verifies that a map expression is successful.")
public void map() {
String expression = "{\'name\' : \'Sarah\', \'surname\' : \'Manning\'}";
Object result = expressionManager.evaluate(expression).getValue();
assertThat(result, is(instanceOf(Map.class)));
assertThat((Map<String, String>) result, hasEntry("name", "Sarah"));
assertThat((Map<String, String>) result, hasEntry("surname", "Manning"));
}
use of io.qameta.allure.Description in project mule by mulesoft.
the class DefaultExpressionManagerMelDefaultTestCase method simple.
@Test
@Description("Verifies that a simple literal expression is successful.")
public void simple() {
String expression = "\"wow\"";
assertString(expression);
}
use of io.qameta.allure.Description in project mule by mulesoft.
the class DefaultExpressionManagerMelDefaultTestCase method transformation.
@Test
@Description("Verifies that a simple transformation works. MVEL ignores expectedDataType")
public void transformation() throws MuleException {
String expression = "payload";
TypedValue result = expressionManager.evaluate(expression, BYTE_ARRAY, builder().build(), testEvent());
assertThat(result.getValue(), is(TEST_PAYLOAD));
assertThat(result.getDataType(), is(STRING));
}
use of io.qameta.allure.Description in project mule by mulesoft.
the class DefaultExpressionManagerMelDefaultTestCase method transformationNotNeeded.
@Test
@Description("Verifies that a simple transformation works even when it's not required.")
public void transformationNotNeeded() throws MuleException {
String expression = "payload";
TypedValue result = expressionManager.evaluate(expression, STRING, builder().build(), testEvent());
assertThat(result.getValue(), is(TEST_PAYLOAD));
assertThat(result.getDataType(), is(STRING));
}
Aggregations