Search in sources :

Example 1 with Methylamine

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

the class JavaDeclarationDelegateTestCase method assertHeisenbergSource.

private void assertHeisenbergSource(SourceDeclaration source, String sourceName, Class<? extends Source> type) {
    assertThat(source.getName(), is(sourceName));
    List<ParameterDeclaration> parameters = source.getAllParameters();
    assertThat(parameters, hasSize(31));
    assertParameter(parameters, SOURCE_PARAMETER, "", INT_TYPE, true, NOT_SUPPORTED, null);
    assertParameter(parameters, SOURCE_CALLBACK_PARAMETER, "", toMetadataType(Long.class), false, SUPPORTED, "#[payload]");
    assertParameter(parameters, SOURCE_REPEATED_CALLBACK_PARAMETER, "", STRING_TYPE, false, SUPPORTED, null);
    assertParameter(parameters, "methylamine", "", toMetadataType(Methylamine.class), false, SUPPORTED, null);
    ImplementingTypeModelProperty typeModelProperty = source.getModelProperty(ImplementingTypeModelProperty.class).get();
    assertThat(typeModelProperty.getType(), equalTo(type));
}
Also used : Methylamine(org.mule.test.heisenberg.extension.model.Methylamine) ParameterDeclaration(org.mule.runtime.api.meta.model.declaration.fluent.ParameterDeclaration) ImplementingTypeModelProperty(org.mule.runtime.module.extension.internal.loader.java.property.ImplementingTypeModelProperty)

Aggregations

ParameterDeclaration (org.mule.runtime.api.meta.model.declaration.fluent.ParameterDeclaration)1 ImplementingTypeModelProperty (org.mule.runtime.module.extension.internal.loader.java.property.ImplementingTypeModelProperty)1 Methylamine (org.mule.test.heisenberg.extension.model.Methylamine)1