Search in sources :

Example 1 with DeleteInputClauseCommand

use of org.kie.workbench.common.dmn.client.commands.expressions.types.dtable.DeleteInputClauseCommand in project kie-wb-common by kiegroup.

the class DecisionTableGridTest method testDeleteInputClause.

@Test
@SuppressWarnings("unchecked")
public void testDeleteInputClause() {
    setupGrid(makeHasNameForDecision(), 0);
    grid.deleteInputClause(1);
    verify(sessionCommandManager).execute(eq(canvasHandler), deleteInputClauseCommandCaptor.capture());
    final DeleteInputClauseCommand deleteInputClauseCommand = deleteInputClauseCommandCaptor.getValue();
    deleteInputClauseCommand.execute(canvasHandler);
    verifyCommandExecuteOperation(BaseExpressionGrid.RESIZE_EXISTING_MINIMUM);
    // Check undo operation
    reset(gridPanel, gridLayer, grid, parentGridColumn);
    deleteInputClauseCommand.undo(canvasHandler);
    verifyCommandUndoOperation(BaseExpressionGrid.RESIZE_EXISTING);
}
Also used : DeleteInputClauseCommand(org.kie.workbench.common.dmn.client.commands.expressions.types.dtable.DeleteInputClauseCommand) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)1 DeleteInputClauseCommand (org.kie.workbench.common.dmn.client.commands.expressions.types.dtable.DeleteInputClauseCommand)1