@Test public void passes_if_changesets_have_modified_checksums_but_run_on_change() { Collection<String> errors = validator.validate( singletonList(changeset("identifier", "author", "MATCH m2 RETURN m2", true)), singletonList(changeset("identifier", "author", "MATCH m RETURN m")) ); assertThat(errors).isEmpty(); }
public Collection<String> validate(Collection<Changeset> declaredChangesets, Collection<Changeset> persistedChangesets) { List<Changeset> changesets = declaredChangesets.stream() .filter(RUN_ON_CHANGE.negate()) .collect(Collectors.toList()); return validateChecksums(changesets, persistedChangesets); }
PersistedChangesetValidator { public Collection<String> validate(Collection<Changeset> declaredChangesets, Collection<Changeset> persistedChangesets) { List<Changeset> changesets = declaredChangesets.stream() .filter(RUN_ON_CHANGE.negate()) .collect(Collectors.toList()); return validateChecksums(changesets, persistedChangesets); } }
PersistedChangesetValidator { public Collection<String> validate(Collection<Changeset> declaredChangesets, Collection<Changeset> persistedChangesets) { List<Changeset> changesets = declaredChangesets.stream() .filter(RUN_ON_CHANGE.negate()) .collect(Collectors.toList()); return validateChecksums(changesets, persistedChangesets); }  }
PersistedChangesetValidator { public Collection<String> validate(Collection<Changeset> declaredChangesets, Collection<Changeset> persistedChangesets) { List<Changeset> changesets = declaredChangesets.stream() .filter(RUN_ON_CHANGE.negate()) .collect(Collectors.toList()); return validateChecksums(changesets, persistedChangesets); }  Collection<String> validate(Collection<Changeset> declaredChangesets, Collection<Changeset> persistedChangesets); }
PersistedChangesetValidator { public Collection<String> validate(Collection<Changeset> declaredChangesets, Collection<Changeset> persistedChangesets) { List<Changeset> changesets = declaredChangesets.stream() .filter(RUN_ON_CHANGE.negate()) .collect(Collectors.toList()); return validateChecksums(changesets, persistedChangesets); }  Collection<String> validate(Collection<Changeset> declaredChangesets, Collection<Changeset> persistedChangesets);  }