Search in sources :

Example 1 with ParameterResolverConfig

use of org.mule.test.parameter.resolver.extension.extension.ParameterResolverConfig in project mule by mulesoft.

the class ParameterResolverOnConfigTestCase method configurationWithDynamicParameterResolvers.

@Test
public void configurationWithDynamicParameterResolvers() throws Exception {
    ParameterResolverConfig config = getPayload("configurationWithDynamicParameterResolvers");
    ParameterResolver<KnockeableDoor> doorResolver = config.getDoorResolver();
    ParameterResolver<String> stringResolver = config.getStringResolver();
    assertParameterResolver(doorResolver, of("#[app.registry.staticDoor]"), is(instanceOf(KnockeableDoor.class)));
    assertParameterResolver(stringResolver, of("#[payload]"), is("this is the payload"));
    assertThat(config.getLiteralDoor().getLiteralValue().get(), equalTo("#[aDoor]"));
}
Also used : KnockeableDoor(org.mule.test.heisenberg.extension.model.KnockeableDoor) ParameterResolverConfig(org.mule.test.parameter.resolver.extension.extension.ParameterResolverConfig) Test(org.junit.Test)

Example 2 with ParameterResolverConfig

use of org.mule.test.parameter.resolver.extension.extension.ParameterResolverConfig in project mule by mulesoft.

the class ParameterResolverOnConfigTestCase method configurationWithStaticParameterResolvers.

@Test
public void configurationWithStaticParameterResolvers() throws Exception {
    ParameterResolverConfig config = getPayload("configurationWithStaticParameterResolvers");
    ParameterResolver<KnockeableDoor> doorResolver = config.getDoorResolver();
    ParameterResolver<String> stringResolver = config.getStringResolver();
    assertParameterResolver(doorResolver, empty(), is(instanceOf(KnockeableDoor.class)));
    assertParameterResolver(stringResolver, empty(), is("this is a string"));
}
Also used : KnockeableDoor(org.mule.test.heisenberg.extension.model.KnockeableDoor) ParameterResolverConfig(org.mule.test.parameter.resolver.extension.extension.ParameterResolverConfig) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)2 KnockeableDoor (org.mule.test.heisenberg.extension.model.KnockeableDoor)2 ParameterResolverConfig (org.mule.test.parameter.resolver.extension.extension.ParameterResolverConfig)2