Search in sources :

Example 26 with OperationDeclaration

use of org.mule.runtime.api.meta.model.declaration.fluent.OperationDeclaration in project mule by mulesoft.

the class DisplayDeclarationEnricherTestCase method parseSummaryAnnotationOnOperationParameter.

@Test
public void parseSummaryAnnotationOnOperationParameter() {
    ExtensionDeclaration extensionDeclaration = heisenbergDeclarer.getDeclaration();
    OperationDeclaration operation = getOperation(extensionDeclaration, HeisenbergOperations.OPERATION_WITH_SUMMARY);
    assertThat(operation, is(notNullValue()));
    List<ParameterDeclaration> parameters = operation.getAllParameters();
    assertParameterSummary(findParameter(parameters, DOOR_PARAMETER), KNOCKEABLE_DOORS_SUMMARY);
}
Also used : ExtensionDeclaration(org.mule.runtime.api.meta.model.declaration.fluent.ExtensionDeclaration) OperationDeclaration(org.mule.runtime.api.meta.model.declaration.fluent.OperationDeclaration) ParameterDeclaration(org.mule.runtime.api.meta.model.declaration.fluent.ParameterDeclaration) Test(org.junit.Test)

Aggregations

OperationDeclaration (org.mule.runtime.api.meta.model.declaration.fluent.OperationDeclaration)26 Test (org.junit.Test)18 ExtensionDeclaration (org.mule.runtime.api.meta.model.declaration.fluent.ExtensionDeclaration)12 ParameterDeclaration (org.mule.runtime.api.meta.model.declaration.fluent.ParameterDeclaration)9 ExtensionDeclarer (org.mule.runtime.api.meta.model.declaration.fluent.ExtensionDeclarer)6 SmallTest (org.mule.tck.size.SmallTest)5 ConfigurationDeclaration (org.mule.runtime.api.meta.model.declaration.fluent.ConfigurationDeclaration)4 SourceDeclaration (org.mule.runtime.api.meta.model.declaration.fluent.SourceDeclaration)4 WithOperationsDeclaration (org.mule.runtime.api.meta.model.declaration.fluent.WithOperationsDeclaration)4 List (java.util.List)3 DeclarationEnricher (org.mule.runtime.extension.api.loader.DeclarationEnricher)3 ExtensionLoadingContext (org.mule.runtime.extension.api.loader.ExtensionLoadingContext)3 DefaultExtensionLoadingContext (org.mule.runtime.extension.internal.loader.DefaultExtensionLoadingContext)3 String.format (java.lang.String.format)2 Map (java.util.Map)2 Optional (java.util.Optional)2 Optional.ofNullable (java.util.Optional.ofNullable)2 MetadataType (org.mule.metadata.api.model.MetadataType)2 StringType (org.mule.metadata.api.model.StringType)2 MuleRuntimeException (org.mule.runtime.api.exception.MuleRuntimeException)2