@Test public void getActionCreatedColumns_firstActionCreatedColumnDoesNotCount() throws Exception { RowMetadata rowMetadata = new RowMetadata(); rowMetadata.addColumn(createColumnNamed("do")); rowMetadata.addColumn(createColumnNamed("ré")); rowMetadata.addColumn(createColumnNamed("mi")); doAnswer(answer(newArrayList("foo", "bar"), emptyList(), firstActionStuffInActionContext)) .when(firstRowAction) .compile(any(ActionContext.class) ); doAnswer(answer(newArrayList("beer"), newArrayList("do", "ré"), secondActionStuffInActionContext)) .when(secondRowAction) .compile(any(ActionContext.class) ); StepDiff diff = onActionsGenerator.computeCreatedColumns(rowMetadata, newArrayList(firstAction), newArrayList(secondAction)); assertEquals(newArrayList("0005"), diff.getCreatedColumns()); }
public StepDiff computeCreatedColumns(final RowMetadata metadata, List<RunnableAction> currentActions, List<RunnableAction> newActions) { RowMetadata workingMetadata = compileActionsOnMetadata(currentActions, metadata); return computeCreatedColumns(newActions, workingMetadata); }
MetadataChangesOnActionsGenerator { public StepDiff computeCreatedColumns(final RowMetadata metadata, List<RunnableAction> currentActions, List<RunnableAction> newActions) { RowMetadata workingMetadata = compileActionsOnMetadata(currentActions, metadata); return computeCreatedColumns(newActions, workingMetadata); } }
MetadataChangesOnActionsGenerator { public StepDiff computeCreatedColumns(final RowMetadata metadata, List<RunnableAction> currentActions, List<RunnableAction> newActions) { RowMetadata workingMetadata = compileActionsOnMetadata(currentActions, metadata); return computeCreatedColumns(newActions, workingMetadata); }  }
MetadataChangesOnActionsGenerator { public StepDiff computeCreatedColumns(final RowMetadata metadata, List<RunnableAction> currentActions, List<RunnableAction> newActions) { RowMetadata workingMetadata = compileActionsOnMetadata(currentActions, metadata); return computeCreatedColumns(newActions, workingMetadata); }  StepDiff computeCreatedColumns(final RowMetadata metadata, List<RunnableAction> currentActions,
            List<RunnableAction> newActions); }
MetadataChangesOnActionsGenerator { public StepDiff computeCreatedColumns(final RowMetadata metadata, List<RunnableAction> currentActions, List<RunnableAction> newActions) { RowMetadata workingMetadata = compileActionsOnMetadata(currentActions, metadata); return computeCreatedColumns(newActions, workingMetadata); }  StepDiff computeCreatedColumns(final RowMetadata metadata, List<RunnableAction> currentActions,
            List<RunnableAction> newActions);  }