use of org.kie.workbench.common.dmn.client.editors.expressions.types.invocation.InvocationUIModelMapper in project kie-wb-common by kiegroup.
the class AddParameterBindingCommandTest method setup.
@Before
@SuppressWarnings("unchecked")
public void setup() {
this.invocation = new Invocation();
this.binding = new Binding();
final InformationItem parameter = new InformationItem();
parameter.setName(new Name("p" + invocation.getBinding().size()));
this.binding.setParameter(parameter);
this.uiModel = new BaseGridData(false);
this.uiModelRow = new DMNGridRow();
this.uiModel.appendColumn(uiRowNumberColumn);
this.uiModel.appendColumn(uiNameColumn);
this.uiModel.appendColumn(uiExpressionEditorColumn);
this.uiModelMapper = new InvocationUIModelMapper(gridWidget, () -> uiModel, () -> Optional.of(invocation), () -> expressionEditorDefinitions, listSelector, 0);
doReturn(ruleManager).when(handler).getRuleManager();
doReturn(0).when(uiRowNumberColumn).getIndex();
doReturn(1).when(uiNameColumn).getIndex();
doReturn(2).when(uiExpressionEditorColumn).getIndex();
doReturn(uiModel).when(gridWidget).getModel();
doReturn(Optional.empty()).when(expressionEditorDefinitions).getExpressionEditorDefinition(any(Optional.class));
}
Aggregations