@Test public void diff_includes_all_latest_changesets_without_declared_context() { Collection<Changeset> changesets = diffMaker.computeChangesetsToInsert( new ExecutionContexts(singletonList("foo")), Arrays.asList(changeset("ID", "fbiville", "CREATE n"), changeset("ID2", "fbiville", "CREATE m")), singletonList(changeset("ID", "fbiville", "CREATE n")) ); assertThat(changesets).containsExactly(changeset("ID2", "fbiville", "CREATE m")); }
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);  }