@Test public void appendToLogAddsANewPropertyLineForEachNewPropertyAfter() { String key1 = "property1"; String key2 = "property2"; String key3 = "property3"; Vertex vertex = vertex() .withProperty(key1, "value") .withProperty(key2, "value") .withProperty(key3, "value") .build(); LogOutput dbLog = mock(LogOutput.class); CreateVertexLogEntry instance = new CreateVertexLogEntry(vertex); instance.appendToLog(dbLog); verify(dbLog).newProperty(argThat(likeProperty().withKey(key1))); verify(dbLog).newProperty(argThat(likeProperty().withKey(key2))); verify(dbLog).newProperty(argThat(likeProperty().withKey(key3))); }
@Override public void appendToLog(LogOutput dbLog) { dbLog.newVertex(vertex); StreamIterator.stream(vertex.properties()) .filter(property -> !propertiesToIgnore.contains(property.key())) .forEach(dbLog::newProperty); }
CreateVertexLogEntry implements LogEntry { @Override public void appendToLog(LogOutput dbLog) { dbLog.newVertex(vertex); StreamIterator.stream(vertex.properties()) .filter(property -> !propertiesToIgnore.contains(property.key())) .forEach(dbLog::newProperty); } }
CreateVertexLogEntry implements LogEntry { @Override public void appendToLog(LogOutput dbLog) { dbLog.newVertex(vertex); StreamIterator.stream(vertex.properties()) .filter(property -> !propertiesToIgnore.contains(property.key())) .forEach(dbLog::newProperty); } CreateVertexLogEntry(Vertex vertex);   CreateVertexLogEntry(Vertex vertex, Set<String> propertiesToIgnore); }
CreateVertexLogEntry implements LogEntry { @Override public void appendToLog(LogOutput dbLog) { dbLog.newVertex(vertex); StreamIterator.stream(vertex.properties()) .filter(property -> !propertiesToIgnore.contains(property.key())) .forEach(dbLog::newProperty); } CreateVertexLogEntry(Vertex vertex);   CreateVertexLogEntry(Vertex vertex, Set<String> propertiesToIgnore); @Override void appendToLog(LogOutput dbLog); }
CreateVertexLogEntry implements LogEntry { @Override public void appendToLog(LogOutput dbLog) { dbLog.newVertex(vertex); StreamIterator.stream(vertex.properties()) .filter(property -> !propertiesToIgnore.contains(property.key())) .forEach(dbLog::newProperty); } CreateVertexLogEntry(Vertex vertex);   CreateVertexLogEntry(Vertex vertex, Set<String> propertiesToIgnore); @Override void appendToLog(LogOutput dbLog); static final Logger LOG; }