@Test public void appendToLogAddsAnDeletePropertyLineForEachPropertyThatDoesNotExistInTheNewVersion() { String deletedProp = "deletedProp"; Vertex oldVersion = vertex().withId("id") .withProperty(deletedProp, "oldValue") .withProperty("oldProp", "oldValue") .withProperty("rev", 1) .build(); Vertex vertex = vertex().withId("id") .withProperty("oldProp", "oldValue") .withProperty("rev", 2) .build(); LogOutput dbLog = mock(LogOutput.class); UpdateVertexLogEntry instance = new UpdateVertexLogEntry(vertex, oldVersion); instance.appendToLog(dbLog); verify(dbLog).updateVertex(vertex); verify(dbLog).deleteProperty(deletedProp); verify(dbLog).updateProperty(argThat(likeProperty().withKey("rev"))); verifyNoMoreInteractions(dbLog); }
@Override public void appendToLog(LogOutput dbLog) { dbLog.updateVertex(vertex); propertyUpdater.updateProperties(dbLog); }
UpdateVertexLogEntry implements LogEntry { @Override public void appendToLog(LogOutput dbLog) { dbLog.updateVertex(vertex); propertyUpdater.updateProperties(dbLog); } }
UpdateVertexLogEntry implements LogEntry { @Override public void appendToLog(LogOutput dbLog) { dbLog.updateVertex(vertex); propertyUpdater.updateProperties(dbLog); } UpdateVertexLogEntry(Vertex vertex, Vertex previousVersion);   UpdateVertexLogEntry(Vertex vertex, Vertex previousVersion, Set<String> propertiesToIgnore); }
UpdateVertexLogEntry implements LogEntry { @Override public void appendToLog(LogOutput dbLog) { dbLog.updateVertex(vertex); propertyUpdater.updateProperties(dbLog); } UpdateVertexLogEntry(Vertex vertex, Vertex previousVersion);   UpdateVertexLogEntry(Vertex vertex, Vertex previousVersion, Set<String> propertiesToIgnore); @Override void appendToLog(LogOutput dbLog); }
UpdateVertexLogEntry implements LogEntry { @Override public void appendToLog(LogOutput dbLog) { dbLog.updateVertex(vertex); propertyUpdater.updateProperties(dbLog); } UpdateVertexLogEntry(Vertex vertex, Vertex previousVersion);   UpdateVertexLogEntry(Vertex vertex, Vertex previousVersion, Set<String> propertiesToIgnore); @Override void appendToLog(LogOutput dbLog);  }