Search in sources :

Example 1 with ParameterizedSource

use of org.mule.runtime.extension.api.runtime.source.ParameterizedSource in project mule by mulesoft.

the class HeisenbergMessageSourceTestCase method obtainSourceParameters.

@Test
public void obtainSourceParameters() throws Exception {
    Component element = locator.find(Location.builder().globalName("source").addSourcePart().build()).get();
    assertThat(element, is(instanceOf(ParameterizedSource.class)));
    ParameterizedSource source = (ParameterizedSource) element;
    Map<String, Object> parameters = source.getInitialisationParameters();
    assertThat(parameters.get("initialBatchNumber"), is(0));
    assertThat(parameters.get("corePoolSize"), is(1));
}
Also used : ParameterizedSource(org.mule.runtime.extension.api.runtime.source.ParameterizedSource) Matchers.containsString(org.hamcrest.Matchers.containsString) Component(org.mule.runtime.api.component.Component) ConfiguredComponent(org.mule.runtime.extension.api.runtime.config.ConfiguredComponent) Test(org.junit.Test)

Aggregations

Matchers.containsString (org.hamcrest.Matchers.containsString)1 Test (org.junit.Test)1 Component (org.mule.runtime.api.component.Component)1 ConfiguredComponent (org.mule.runtime.extension.api.runtime.config.ConfiguredComponent)1 ParameterizedSource (org.mule.runtime.extension.api.runtime.source.ParameterizedSource)1