Search in sources :

Example 1 with DeleteOutputClauseCommand

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

the class DecisionTableGridTest method testDeleteOutputClause.

@Test
public void testDeleteOutputClause() {
    setupGrid(makeHasNameForDecision(), 0);
    grid.deleteOutputClause(2);
    verify(sessionCommandManager).execute(eq(canvasHandler), deleteOutputClauseCommandCaptor.capture());
    final DeleteOutputClauseCommand deleteOutputClauseCommand = deleteOutputClauseCommandCaptor.getValue();
    deleteOutputClauseCommand.execute(canvasHandler);
    verifyCommandExecuteOperation(BaseExpressionGrid.RESIZE_EXISTING_MINIMUM);
    // Check undo operation
    reset(gridPanel, gridLayer, grid, parentGridColumn);
    deleteOutputClauseCommand.undo(canvasHandler);
    verifyCommandUndoOperation(BaseExpressionGrid.RESIZE_EXISTING);
}
Also used : DeleteOutputClauseCommand(org.kie.workbench.common.dmn.client.commands.expressions.types.dtable.DeleteOutputClauseCommand) Test(org.junit.Test)

Aggregations

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