Search in sources :

Example 71 with OperationModel

use of org.mule.runtime.api.meta.model.operation.OperationModel in project mule by mulesoft.

the class ExtensionWithCustomStaticTypesTestCase method withInputXmlStaticType.

@Test
public void withInputXmlStaticType() throws Exception {
    OperationModel o = getOperation("xmlInput");
    ParameterModel param = o.getAllParameterModels().get(0);
    assertXmlOrder(param);
}
Also used : ParameterModel(org.mule.runtime.api.meta.model.parameter.ParameterModel) OperationModel(org.mule.runtime.api.meta.model.operation.OperationModel) Test(org.junit.Test)

Example 72 with OperationModel

use of org.mule.runtime.api.meta.model.operation.OperationModel in project mule by mulesoft.

the class ExtensionWithCustomStaticTypesTestCase method withInputJsonType.

@Test
public void withInputJsonType() throws Exception {
    OperationModel o = getOperation("jsonInputStream");
    ParameterModel param = o.getAllParameterModels().get(0);
    assertJsonPerson(param);
}
Also used : ParameterModel(org.mule.runtime.api.meta.model.parameter.ParameterModel) OperationModel(org.mule.runtime.api.meta.model.operation.OperationModel) Test(org.junit.Test)

Example 73 with OperationModel

use of org.mule.runtime.api.meta.model.operation.OperationModel in project mule by mulesoft.

the class ExtensionWithCustomStaticTypesTestCase method customTypeInput.

@Test
public void customTypeInput() throws Exception {
    OperationModel o = getOperation("customTypeInput");
    ParameterModel param = o.getAllParameterModels().get(0);
    assertCustomJsonType(param);
}
Also used : ParameterModel(org.mule.runtime.api.meta.model.parameter.ParameterModel) OperationModel(org.mule.runtime.api.meta.model.operation.OperationModel) Test(org.junit.Test)

Example 74 with OperationModel

use of org.mule.runtime.api.meta.model.operation.OperationModel in project mule by mulesoft.

the class ExtensionWithCustomStaticTypesTestCase method customTypeOutput.

@Test
public void customTypeOutput() throws Exception {
    OperationModel o = getOperation("customTypeOutput");
    OutputModel output = o.getOutput();
    MetadataType type = output.getType();
    assertThat(output.hasDynamicType(), is(false));
    assertThat(type.getMetadataFormat(), is(CSV));
    assertThat(type.toString(), is("csv-object"));
}
Also used : MetadataType(org.mule.metadata.api.model.MetadataType) OutputModel(org.mule.runtime.api.meta.model.OutputModel) OperationModel(org.mule.runtime.api.meta.model.operation.OperationModel) Test(org.junit.Test)

Example 75 with OperationModel

use of org.mule.runtime.api.meta.model.operation.OperationModel in project mule by mulesoft.

the class ExtensionWithCustomStaticTypesTestCase method withOutputAttributesXmlStaticType.

@Test
public void withOutputAttributesXmlStaticType() throws Exception {
    OperationModel o = getOperation("xmlAttributes");
    assertXmlOrder(o.getOutputAttributes());
}
Also used : OperationModel(org.mule.runtime.api.meta.model.operation.OperationModel) Test(org.junit.Test)

Aggregations

OperationModel (org.mule.runtime.api.meta.model.operation.OperationModel)96 Test (org.junit.Test)68 ParameterModel (org.mule.runtime.api.meta.model.parameter.ParameterModel)29 ExtensionModel (org.mule.runtime.api.meta.model.ExtensionModel)27 ConfigurationModel (org.mule.runtime.api.meta.model.config.ConfigurationModel)15 SmallTest (org.mule.tck.size.SmallTest)14 Optional (java.util.Optional)13 SourceModel (org.mule.runtime.api.meta.model.source.SourceModel)12 MetadataType (org.mule.metadata.api.model.MetadataType)11 List (java.util.List)10 Set (java.util.Set)9 ConnectionProviderModel (org.mule.runtime.api.meta.model.connection.ConnectionProviderModel)9 Optional.empty (java.util.Optional.empty)8 IdempotentExtensionWalker (org.mule.runtime.api.meta.model.util.IdempotentExtensionWalker)8 ObjectType (org.mule.metadata.api.model.ObjectType)7 OutputModel (org.mule.runtime.api.meta.model.OutputModel)7 ConstructModel (org.mule.runtime.api.meta.model.construct.ConstructModel)7 HasOperationModels (org.mule.runtime.api.meta.model.operation.HasOperationModels)7 ExtensionWalker (org.mule.runtime.api.meta.model.util.ExtensionWalker)7 OperationComponentModelModelProperty (org.mule.runtime.config.internal.dsl.model.extension.xml.property.OperationComponentModelModelProperty)6