use of org.mule.runtime.api.meta.model.declaration.fluent.ExtensionDeclaration in project mule by mulesoft.
the class DisplayDeclarationEnricherTestCase method parseSummaryAnnotationOnConfigParameter.
@Test
public void parseSummaryAnnotationOnConfigParameter() {
ExtensionDeclaration extensionDeclaration = heisenbergDeclarer.getDeclaration();
List<ParameterDeclaration> parameters = extensionDeclaration.getConfigurations().get(0).getAllParameters();
assertParameterSummary(findParameter(parameters, "ricinPacks"), RICIN_PACKS_SUMMARY);
}
use of org.mule.runtime.api.meta.model.declaration.fluent.ExtensionDeclaration in project mule by mulesoft.
the class DisplayDeclarationEnricherTestCase method parseClassParameter.
@Test
public void parseClassParameter() {
ExtensionDeclaration declaration = marvelDeclarer.getDeclaration();
ConfigurationDeclaration config = findConfigByName(declaration, IronMan.CONFIG_NAME);
List<ParameterDeclaration> params = config.getAllParameters();
assertThat(params, hasSize(2));
ParameterDeclaration pathParam = params.get(1);
Optional<ClassValueModel> classValueModel = pathParam.getDisplayModel().getClassValueModel();
assertThat(classValueModel.isPresent(), is(true));
assertThat(classValueModel.get().getAssignableFrom(), hasSize(1));
assertThat(classValueModel.get().getAssignableFrom().get(0), equalTo("com.starkindustries.AIEngine"));
}
use of org.mule.runtime.api.meta.model.declaration.fluent.ExtensionDeclaration in project mule by mulesoft.
the class DisplayDeclarationEnricherTestCase method parseSimplePathParameter.
@Test
public void parseSimplePathParameter() {
ExtensionDeclaration declaration = marvelDeclarer.getDeclaration();
ConfigurationDeclaration config = findConfigByName(declaration, IronMan.CONFIG_NAME);
List<ParameterDeclaration> params = config.getAllParameters();
assertThat(params, hasSize(2));
ParameterDeclaration pathParam = params.get(0);
Optional<PathModel> pathModel = pathParam.getDisplayModel().getPathModel();
assertThat(pathModel.isPresent(), is(true));
assertThat(pathModel.get().getType(), is(ANY));
assertThat(pathModel.get().acceptsUrls(), is(true));
assertThat(pathModel.get().getFileExtensions(), empty());
}
use of org.mule.runtime.api.meta.model.declaration.fluent.ExtensionDeclaration in project mule by mulesoft.
the class DisplayDeclarationEnricherTestCase method parseDisplayNameAnnotationOnParameterGroup.
@Test
public void parseDisplayNameAnnotationOnParameterGroup() {
ExtensionDeclaration extensionDeclaration = heisenbergDeclarer.getDeclaration();
List<ParameterDeclaration> parameters = extensionDeclaration.getConfigurations().get(0).getAllParameters();
assertParameterDisplayName(findParameter(parameters, PARAMETER_GROUP_ORIGINAL_DISPLAY_NAME), PARAMETER_GROUP_DISPLAY_NAME);
}
use of org.mule.runtime.api.meta.model.declaration.fluent.ExtensionDeclaration in project mule by mulesoft.
the class DisplayDeclarationEnricherTestCase method parseExampleAnnotationOnConfigParameter.
@Test
public void parseExampleAnnotationOnConfigParameter() {
ExtensionDeclaration extensionDeclaration = heisenbergDeclarer.getDeclaration();
List<ParameterDeclaration> parameters = extensionDeclaration.getConfigurations().get(0).getAllParameters();
assertParameterExample(findParameter(parameters, "labAddress"), LAB_ADDRESS_EXAMPLE);
}
Aggregations