use of org.mule.runtime.extension.api.loader.ProblemsReporter in project mule by mulesoft.
the class TransactionalParametersValidatorTestCase method setUp.
@Before
public void setUp() {
when(extensionModel.getSourceModels()).thenReturn(singletonList(sourceModel));
when(extensionModel.getOperationModels()).thenReturn(singletonList(operationModel));
when(sourceModel.getErrorCallback()).thenReturn(Optional.empty());
when(sourceModel.getSuccessCallback()).thenReturn(Optional.empty());
when(sourceModel.getParameterGroupModels()).thenReturn(singletonList(parameterGroupModel));
when(sourceModel.isTransactional()).thenReturn(true);
when(operationModel.isTransactional()).thenReturn(true);
when(parameterGroupModel.getParameterModels()).thenReturn(singletonList(txParameter));
when(txParameter.getName()).thenReturn(TRANSACTIONAL_ACTION_PARAMETER_NAME);
when(txParameter.getModelProperty(TransactionalActionModelProperty.class)).thenReturn(transactionalActionModelProperty);
problemsReporter = new ProblemsReporter(extensionModel);
}
use of org.mule.runtime.extension.api.loader.ProblemsReporter in project mule by mulesoft.
the class ValueProviderModelValidatorTestCase method setUp.
@Before
public void setUp() {
valueProviderModelValidator = new ValueProviderModelValidator();
problemsReporter = new ProblemsReporter(extensionModel);
operationParameterBuilder = ValueProviderFactoryModelProperty.builder(SomeValueProvider.class);
configrationParameterBuilder = ValueProviderFactoryModelProperty.builder(SomeValueProvider.class);
visitableMock(operationModel);
when(extensionModel.getConfigurationModels()).thenReturn(asList(configurationModel));
when(configurationModel.getAllParameterModels()).thenReturn(asList(configrationParameter));
when(configurationModel.getParameterGroupModels()).thenReturn(asList(configurationParameterGroupModel));
when(configurationModel.getName()).thenReturn("SomeConfig");
when(configurationParameterGroupModel.getParameterModels()).thenReturn(asList(configrationParameter));
when(extensionModel.getOperationModels()).thenReturn(singletonList(operationModel));
when(operationModel.getAllParameterModels()).thenReturn(asList(operationParameter));
when(operationModel.getName()).thenReturn("superOperation");
when(parameterGroupModel.getParameterModels()).thenReturn(asList(operationParameter));
when(operationModel.getParameterGroupModels()).thenReturn(asList(parameterGroupModel));
mockParameter(configrationParameter, configrationParameterBuilder);
mockParameter(operationParameter, operationParameterBuilder);
}
Aggregations