@Test public void testGetClauseIndex() { final List dtOutputs = mock(List.class); final List dtInputs = mock(List.class); final int outputsSize = 3; final int inputsSize = 7; when(dtOutputs.size()).thenReturn(outputsSize); when(dtInputs.size()).thenReturn(inputsSize); when(decisionTable.getOutput()).thenReturn(dtOutputs); when(decisionTable.getInput()).thenReturn(dtInputs); final int expected = uiColumnIndex - DecisionTableUIModelMapperHelper.ROW_INDEX_COLUMN_COUNT - inputsSize - outputsSize; final int actual = command.getClauseIndex(); verify(dtOutputs).size(); verify(dtInputs).size(); assertEquals(expected, actual); }
int getClauseIndex() { return uiColumnIndex - DecisionTableUIModelMapperHelper.ROW_INDEX_COLUMN_COUNT - decisionTable.getInput().size() - decisionTable.getOutput().size(); }
AddRuleAnnotationClauseCommand extends AbstractCanvasGraphCommand implements VetoExecutionCommand,
                                                                                          VetoUndoCommand { int getClauseIndex() { return uiColumnIndex - DecisionTableUIModelMapperHelper.ROW_INDEX_COLUMN_COUNT - decisionTable.getInput().size() - decisionTable.getOutput().size(); } }
AddRuleAnnotationClauseCommand extends AbstractCanvasGraphCommand implements VetoExecutionCommand,
                                                                                          VetoUndoCommand { int getClauseIndex() { return uiColumnIndex - DecisionTableUIModelMapperHelper.ROW_INDEX_COLUMN_COUNT - decisionTable.getInput().size() - decisionTable.getOutput().size(); } AddRuleAnnotationClauseCommand(final DecisionTable decisionTable,
                                          final RuleAnnotationClause ruleAnnotationClause,
                                          final GridData uiModel,
                                          final Supplier<RuleAnnotationClauseColumn> uiModelColumnSupplier,
                                          final int uiColumnIndex,
                                          final DecisionTableUIModelMapper uiModelMapper,
                                          final org.uberfire.mvp.Command executeCanvasOperation,
                                          final org.uberfire.mvp.Command undoCanvasOperation); }
AddRuleAnnotationClauseCommand extends AbstractCanvasGraphCommand implements VetoExecutionCommand,
                                                                                          VetoUndoCommand { int getClauseIndex() { return uiColumnIndex - DecisionTableUIModelMapperHelper.ROW_INDEX_COLUMN_COUNT - decisionTable.getInput().size() - decisionTable.getOutput().size(); } AddRuleAnnotationClauseCommand(final DecisionTable decisionTable,
                                          final RuleAnnotationClause ruleAnnotationClause,
                                          final GridData uiModel,
                                          final Supplier<RuleAnnotationClauseColumn> uiModelColumnSupplier,
                                          final int uiColumnIndex,
                                          final DecisionTableUIModelMapper uiModelMapper,
                                          final org.uberfire.mvp.Command executeCanvasOperation,
                                          final org.uberfire.mvp.Command undoCanvasOperation); void updateParentInformation(); }
AddRuleAnnotationClauseCommand extends AbstractCanvasGraphCommand implements VetoExecutionCommand,
                                                                                          VetoUndoCommand { int getClauseIndex() { return uiColumnIndex - DecisionTableUIModelMapperHelper.ROW_INDEX_COLUMN_COUNT - decisionTable.getInput().size() - decisionTable.getOutput().size(); } AddRuleAnnotationClauseCommand(final DecisionTable decisionTable,
                                          final RuleAnnotationClause ruleAnnotationClause,
                                          final GridData uiModel,
                                          final Supplier<RuleAnnotationClauseColumn> uiModelColumnSupplier,
                                          final int uiColumnIndex,
                                          final DecisionTableUIModelMapper uiModelMapper,
                                          final org.uberfire.mvp.Command executeCanvasOperation,
                                          final org.uberfire.mvp.Command undoCanvasOperation); void updateParentInformation();  }