use of org.mule.runtime.module.extension.internal.loader.java.type.property.ExtensionOperationDescriptorModelProperty in project mule by mulesoft.
the class ExportedArtifactsCollectorTestCase method withMethod.
private void withMethod(OperationModel operationModel, Optional<Method> optionalMethod) {
when(operationModel.getModelProperty(ImplementingMethodModelProperty.class)).thenReturn(optionalMethod.map(ImplementingMethodModelProperty::new));
when(operationModel.getModelProperty(ExtensionOperationDescriptorModelProperty.class)).thenReturn(optionalMethod.map(method -> new ExtensionOperationDescriptorModelProperty(new MethodWrapper(method, loader))));
}
use of org.mule.runtime.module.extension.internal.loader.java.type.property.ExtensionOperationDescriptorModelProperty in project mule by mulesoft.
the class OperationReturnTypeModelValidatorTestCase method before.
@Before
public void before() {
ExtensionOperationDescriptorModelProperty modelProperty = new ExtensionOperationDescriptorModelProperty(methodElement);
when(extensionModel.getOperationModels()).thenReturn(asList(operationModel));
when(operationModel.getOutput()).thenReturn(new ImmutableOutputModel("Message.Payload", toMetadataType(String.class), false, emptySet()));
when(operationModel.getName()).thenReturn("operation");
when(operationModel.getModelProperty(ExtensionOperationDescriptorModelProperty.class)).thenReturn(Optional.of(modelProperty));
when(methodElement.getReturnType()).thenReturn(new TypeWrapper(String.class, typeLoader));
visitableMock(operationModel);
}
use of org.mule.runtime.module.extension.internal.loader.java.type.property.ExtensionOperationDescriptorModelProperty in project mule by mulesoft.
the class ExportedPackagesValidatorTestCase method withMethod.
private void withMethod(OperationModel operationModel, Optional<Method> optionalMethod) {
when(operationModel.getModelProperty(ImplementingMethodModelProperty.class)).thenReturn(optionalMethod.map(ImplementingMethodModelProperty::new));
when(operationModel.getModelProperty(ExtensionOperationDescriptorModelProperty.class)).thenReturn(optionalMethod.map(method -> new ExtensionOperationDescriptorModelProperty(new MethodWrapper(method, loader))));
}
Aggregations