@Test public void appendToLogAddsAnUpdatePropertyLineForEachPropertyThatHasADifferentValueInTheUpdatedVersion() { String updatedProp = "updatedProp"; Edge prevEdge = edge().withId(ID) .withProperty(updatedProp, "oldValue") .withProperty("oldProp", "oldValue") .withProperty("rev", 1) .build(); Edge edge = edge().withId(ID) .withProperty(updatedProp, "newValue") .withProperty("oldProp", "oldValue") .withProperty("rev", 2) .build(); LogOutput dbLog = mock(LogOutput.class); UpdateEdgeLogEntry instance = new UpdateEdgeLogEntry(edge, prevEdge); instance.appendToLog(dbLog); verify(dbLog).updateEdge(edge); verify(dbLog).updateProperty(argThat(likeProperty().withKey(updatedProp))); verify(dbLog).updateProperty(argThat(likeProperty().withKey("rev"))); verifyNoMoreInteractions(dbLog); }
@Override public void appendToLog(LogOutput dbLog) { dbLog.updateEdge(edge); propertyUpdater.updateProperties(dbLog); }
UpdateEdgeLogEntry implements LogEntry { @Override public void appendToLog(LogOutput dbLog) { dbLog.updateEdge(edge); propertyUpdater.updateProperties(dbLog); } }
UpdateEdgeLogEntry implements LogEntry { @Override public void appendToLog(LogOutput dbLog) { dbLog.updateEdge(edge); propertyUpdater.updateProperties(dbLog); } UpdateEdgeLogEntry(Edge edge, Edge prevEdge);   UpdateEdgeLogEntry(Edge edge, Edge prevEdge, Set<String> propertiesToIgnore); }
UpdateEdgeLogEntry implements LogEntry { @Override public void appendToLog(LogOutput dbLog) { dbLog.updateEdge(edge); propertyUpdater.updateProperties(dbLog); } UpdateEdgeLogEntry(Edge edge, Edge prevEdge);   UpdateEdgeLogEntry(Edge edge, Edge prevEdge, Set<String> propertiesToIgnore); @Override void appendToLog(LogOutput dbLog); }
UpdateEdgeLogEntry implements LogEntry { @Override public void appendToLog(LogOutput dbLog) { dbLog.updateEdge(edge); propertyUpdater.updateProperties(dbLog); } UpdateEdgeLogEntry(Edge edge, Edge prevEdge);   UpdateEdgeLogEntry(Edge edge, Edge prevEdge, Set<String> propertiesToIgnore); @Override void appendToLog(LogOutput dbLog);  }