@Test public void diff_includes_run_on_change_changesets_that_never_ran_or_were_altered_since_last_execution() { Collection<Changeset> changesets = diffMaker.computeChangesetsToInsert( DEFAULT_CONTEXT, Arrays.asList( changeset("ID", "fbiville", "CREATE n2 RETURN n2", "baz", false, true), changeset("ID2", "fbiville", "CREATE m", "foo", false, true) ), singletonList(changeset("ID", "fbiville", "CREATE n")) ); assertThat(changesets) .extracting("id") .containsExactly("ID", "ID2"); }
public Collection<Changeset> computeChangesetsToInsert(ExecutionContexts executionContexts, Collection<Changeset> declaredChangesets, Collection<Changeset> persistedChangesets) { return declaredChangesets.stream() .filter(BY_ANY_EXECUTION_CONTEXT(executionContexts)) .filter(executionFilter(persistedChangesets)) .collect(toList()); }
ChangelogDiffMaker { public Collection<Changeset> computeChangesetsToInsert(ExecutionContexts executionContexts, Collection<Changeset> declaredChangesets, Collection<Changeset> persistedChangesets) { return declaredChangesets.stream() .filter(BY_ANY_EXECUTION_CONTEXT(executionContexts)) .filter(executionFilter(persistedChangesets)) .collect(toList()); } }
ChangelogDiffMaker { public Collection<Changeset> computeChangesetsToInsert(ExecutionContexts executionContexts, Collection<Changeset> declaredChangesets, Collection<Changeset> persistedChangesets) { return declaredChangesets.stream() .filter(BY_ANY_EXECUTION_CONTEXT(executionContexts)) .filter(executionFilter(persistedChangesets)) .collect(toList()); }  }
ChangelogDiffMaker { public Collection<Changeset> computeChangesetsToInsert(ExecutionContexts executionContexts, Collection<Changeset> declaredChangesets, Collection<Changeset> persistedChangesets) { return declaredChangesets.stream() .filter(BY_ANY_EXECUTION_CONTEXT(executionContexts)) .filter(executionFilter(persistedChangesets)) .collect(toList()); }  Collection<Changeset> computeChangesetsToInsert(ExecutionContexts executionContexts,
                                                           Collection<Changeset> declaredChangesets,
                                                           Collection<Changeset> persistedChangesets); }
ChangelogDiffMaker { public Collection<Changeset> computeChangesetsToInsert(ExecutionContexts executionContexts, Collection<Changeset> declaredChangesets, Collection<Changeset> persistedChangesets) { return declaredChangesets.stream() .filter(BY_ANY_EXECUTION_CONTEXT(executionContexts)) .filter(executionFilter(persistedChangesets)) .collect(toList()); }  Collection<Changeset> computeChangesetsToInsert(ExecutionContexts executionContexts,
                                                           Collection<Changeset> declaredChangesets,
                                                           Collection<Changeset> persistedChangesets);  }