use of org.mule.runtime.api.meta.model.parameter.ParameterModel in project mule by mulesoft.
the class NameClashModelValidatorTestCase method mapSingularizeClashOnParameterSameType.
@Test
public void mapSingularizeClashOnParameterSameType() {
ParameterModel offending = getParameter(CHILD_PLURAL_PARAM_NAME, childTestMap);
ParameterModel singular = getParameter(CHILD_SINGULAR_PARAM_NAME, ChildTest.class);
when(operationModel.getAllParameterModels()).thenReturn(asList(singular, offending));
validate();
}
use of org.mule.runtime.api.meta.model.parameter.ParameterModel in project mule by mulesoft.
the class NameClashModelValidatorTestCase method repeatedContentParameterNameAndSource.
@Test
public void repeatedContentParameterNameAndSource() {
exception.expect(IllegalModelDefinitionException.class);
when(sourceModel.getName()).thenReturn(REPEATED_NAME);
ParameterModel param = getParameter(REPEATED_NAME, ChildObjectTest.class);
when(param.getRole()).thenReturn(PRIMARY_CONTENT);
when(operationModel.getAllParameterModels()).thenReturn(asList(param));
validate();
}
use of org.mule.runtime.api.meta.model.parameter.ParameterModel in project mule by mulesoft.
the class NameClashModelValidatorTestCase method operationNameClashesWithParameterTypeName.
@Test
public void operationNameClashesWithParameterTypeName() {
exception.expect(IllegalModelDefinitionException.class);
ParameterModel offending = getParameter(TOP_LEVEL_SINGULAR_PARAM_NAME, TopLevelTest.class);
when(operationModel.getName()).thenReturn(TopLevelTest.class.getSimpleName());
mockParameters(operationModel, topLevelOperationParam, offending);
validate();
}
use of org.mule.runtime.api.meta.model.parameter.ParameterModel in project mule by mulesoft.
the class NameClashModelValidatorTestCase method operationWithRepeatedParameterName.
@Test
public void operationWithRepeatedParameterName() {
exception.expect(IllegalModelDefinitionException.class);
ParameterModel offending = getParameter(SIMPLE_PARAM_NAME, String.class);
mockParameters(operationModel, simpleConfigParam, topLevelConfigParam, offending);
validate();
}
use of org.mule.runtime.api.meta.model.parameter.ParameterModel in project mule by mulesoft.
the class NameClashModelValidatorTestCase method listSingularizeClashOnParameterSameTypeOnConstruct.
@Test
public void listSingularizeClashOnParameterSameTypeOnConstruct() {
ParameterModel offending = getParameter(CHILD_PLURAL_PARAM_NAME, childTestList);
ParameterModel singular = getParameter(CHILD_SINGULAR_PARAM_NAME, ChildTest.class);
when(constructModel.getAllParameterModels()).thenReturn(asList(singular, offending));
validate();
}
Aggregations