Search in sources :

Example 1 with BarberPreferences

use of org.mule.test.heisenberg.extension.model.BarberPreferences in project mule by mulesoft.

the class OperationExecutionTestCase method getInlineGroupDefinition.

@Test
public void getInlineGroupDefinition() throws Exception {
    Message message = flowRunner("getBarberPreferences").withPayload(EMPTY_STRING).run().getMessage();
    assertThat(message.getPayload().getValue(), is(notNullValue()));
    assertThat(message.getPayload().getDataType().getMediaType().matches(APPLICATION_JAVA), is(true));
    BarberPreferences preferences = (BarberPreferences) message.getPayload().getValue();
    assertThat(preferences.getBeardTrimming(), is(BarberPreferences.BEARD_KIND.MUSTACHE));
    assertThat(preferences.isFullyBald(), is(false));
}
Also used : BarberPreferences(org.mule.test.heisenberg.extension.model.BarberPreferences) Message(org.mule.runtime.api.message.Message) Test(org.junit.Test)

Example 2 with BarberPreferences

use of org.mule.test.heisenberg.extension.model.BarberPreferences in project mule by mulesoft.

the class OperationExecutionTestCase method getInlineGroupDefinitionAsArgument.

@Test
public void getInlineGroupDefinitionAsArgument() throws Exception {
    Message message = flowRunner("getInlineInfo").withPayload(EMPTY_STRING).run().getMessage();
    assertThat(message.getPayload().getValue(), is(notNullValue()));
    BarberPreferences preferences = (BarberPreferences) message.getPayload().getValue();
    assertThat(preferences.getBeardTrimming(), is(BarberPreferences.BEARD_KIND.MUSTACHE));
    assertThat(preferences.isFullyBald(), is(true));
}
Also used : BarberPreferences(org.mule.test.heisenberg.extension.model.BarberPreferences) Message(org.mule.runtime.api.message.Message) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)2 Message (org.mule.runtime.api.message.Message)2 BarberPreferences (org.mule.test.heisenberg.extension.model.BarberPreferences)2