use of org.mule.metadata.api.model.MetadataType in project mule by mulesoft.
the class IntrospectionUtilsTestCase method resultWithNoGenericsIsAnyType.
@Test
public void resultWithNoGenericsIsAnyType() throws Exception {
MetadataType resultWithNoGenerics = getMethod("resultWithNoGenerics").getReturnMetadataType();
MetadataType resultWithWildcardGenerics = getMethod("resultWithWildcardGenerics").getReturnMetadataType();
assertThat(resultWithNoGenerics, is(instanceOf(AnyType.class)));
assertThat(resultWithWildcardGenerics, is(instanceOf(AnyType.class)));
}
use of org.mule.metadata.api.model.MetadataType in project mule by mulesoft.
the class IntrospectionUtilsTestCase method assertAttributesType.
private void assertAttributesType(String method) throws Exception {
MetadataType attributesType = IntrospectionUtils.getMethodReturnAttributesType(getMethod(method));
assertThat(attributesType, is(instanceOf(ObjectType.class)));
assertType(attributesType, Object.class);
}
use of org.mule.metadata.api.model.MetadataType in project mule by mulesoft.
the class IntrospectionUtilsTestCase method getMethodReturnType.
@Test
public void getMethodReturnType() throws Exception {
MetadataType metadataType = IntrospectionUtils.getMethodReturnType(getMethod(FOO));
assertDictionary(metadataType, Apple.class);
}
use of org.mule.metadata.api.model.MetadataType in project mule by mulesoft.
the class IntrospectionUtilsTestCase method assertPagingProviderReturnResultType.
private void assertPagingProviderReturnResultType(String method) throws Exception {
MetadataType returnType = IntrospectionUtils.getMethodReturnType(getMethod(method));
assertThat(returnType, is(instanceOf(ArrayType.class)));
assertMessageType(((ArrayType) returnType).getType(), is(instanceOf(StringType.class)), is(instanceOf(ObjectType.class)));
}
use of org.mule.metadata.api.model.MetadataType in project mule by mulesoft.
the class IntrospectionUtilsTestCase method getFieldDataType.
@Test
public void getFieldDataType() throws Exception {
MetadataType type = getFieldMetadataType(IntrospectionUtilsTestCase.class.getDeclaredField("baskets"), TYPE_LOADER);
assertList(type, FruitBasket.class);
}
Aggregations