use of org.kie.workbench.common.dmn.client.widgets.grid.model.GridCellTuple in project kie-wb-common by kiegroup.
the class ListUIModelMapperTest method assertFromDMNModelLiteralExpression.
private void assertFromDMNModelLiteralExpression(final boolean isOnlyVisualChangeAllowed) {
assertTrue(uiModel.getCell(0, EXPRESSION_COLUMN_INDEX).getValue() instanceof ExpressionCellValue);
final ExpressionCellValue dcv = (ExpressionCellValue) uiModel.getCell(0, EXPRESSION_COLUMN_INDEX).getValue();
assertEquals(literalExpressionEditor, dcv.getValue().get());
verify(literalExpressionEditorDefinition).getEditor(parentCaptor.capture(), eq(Optional.empty()), eq(list.getExpression().get(0)), eq(Optional.empty()), eq(isOnlyVisualChangeAllowed), eq(1));
final GridCellTuple parent = parentCaptor.getValue();
assertEquals(0, parent.getRowIndex());
assertEquals(EXPRESSION_COLUMN_INDEX, parent.getColumnIndex());
assertEquals(gridWidget, parent.getGridWidget());
}
use of org.kie.workbench.common.dmn.client.widgets.grid.model.GridCellTuple in project kie-wb-common by kiegroup.
the class ListUIModelMapperTest method assertFromDMNModelUndefinedExpression.
private void assertFromDMNModelUndefinedExpression(final boolean isOnlyVisualChangeAllowed) {
assertTrue(uiModel.getCell(0, EXPRESSION_COLUMN_INDEX).getValue() instanceof ExpressionCellValue);
final ExpressionCellValue dcv = (ExpressionCellValue) uiModel.getCell(0, EXPRESSION_COLUMN_INDEX).getValue();
assertEquals(undefinedExpressionEditor, dcv.getValue().get());
verify(undefinedExpressionEditorDefinition).getEditor(parentCaptor.capture(), eq(Optional.empty()), eq(list.getExpression().get(0)), eq(Optional.empty()), eq(isOnlyVisualChangeAllowed), eq(1));
final GridCellTuple parent = parentCaptor.getValue();
assertEquals(0, parent.getRowIndex());
assertEquals(EXPRESSION_COLUMN_INDEX, parent.getColumnIndex());
assertEquals(gridWidget, parent.getGridWidget());
}
Aggregations