use of org.mule.runtime.extension.api.model.ImmutableOutputModel in project mule by mulesoft.
the class MetadataComponentModelValidatorTestCase method sourceReturnsObjectType.
@Test
public void sourceReturnsObjectType() {
exception.expect(IllegalModelDefinitionException.class);
when(sourceModel.getOutput()).thenReturn(new ImmutableOutputModel(EMPTY, toMetadataType(Object.class), false, emptySet()));
validate(extensionModel, validator);
}
use of org.mule.runtime.extension.api.model.ImmutableOutputModel in project mule by mulesoft.
the class MetadataComponentModelValidatorTestCase method operationWithAttributeResolverButNoAttributes.
@Test
public void operationWithAttributeResolverButNoAttributes() {
exception.expect(IllegalModelDefinitionException.class);
when(extensionModel.getSourceModels()).thenReturn(emptyList());
mockMetadataResolverFactory(operationModel, new DefaultMetadataResolverFactory(NULL_RESOLVER_SUPPLIER, emptyMap(), SIMPLE_OUTPUT_RESOLVER, SIMPLE_OUTPUT_RESOLVER));
when(operationModel.getModelProperty(MetadataKeyIdModelProperty.class)).thenReturn(empty());
when(operationModel.getOutput()).thenReturn(new ImmutableOutputModel(EMPTY, toMetadataType(Object.class), false, emptySet()));
when(operationModel.getOutputAttributes()).thenReturn(new ImmutableOutputModel(EMPTY, toMetadataType(void.class), false, emptySet()));
validate(extensionModel, validator);
}
Aggregations