@Test public void fixSetsTheAcceptedPropertiesToTrue() { UUID rel1Id = UUID.fromString("ff65089c-2ded-4af0-95e7-0476979f96b8"); GraphWrapper wrapper = newGraph().withVertex("v1", v -> v.withTimId("id1")) .withVertex("v2", v -> v.withTimId("id2") .withOutgoingRelation("relatedTo", "v1", r -> r.withTim_id(rel1Id).withRev(2) .withIsLatest(true) .withModified(changeWithTimestamp(10000L)) .withCreated(changeWithTimestamp(1500L)) .withAccepted("vrerel", false) ) ) .wrap(); DatabaseFixer databaseFixer = new DatabaseFixer(wrapper); databaseFixer.fix(); assertThat(wrapper.getGraph().traversal().E().has("tim_id", rel1Id.toString()).toList(), containsInAnyOrder( likeEdge().withId(rel1Id.toString()).withProperty("rev", 1).withProperty("vrerel_accepted", true), likeEdge().withId(rel1Id.toString()).withProperty("rev", 2).withProperty("vrerel_accepted", false) )); }
public void fix() { Graph graph = graphWrapper .getGraph(); fixEdges(graph); fixVertices(graph); }
DatabaseFixer { public void fix() { Graph graph = graphWrapper .getGraph(); fixEdges(graph); fixVertices(graph); } }
DatabaseFixer { public void fix() { Graph graph = graphWrapper .getGraph(); fixEdges(graph); fixVertices(graph); } DatabaseFixer(GraphWrapper graphWrapper); }
DatabaseFixer { public void fix() { Graph graph = graphWrapper .getGraph(); fixEdges(graph); fixVertices(graph); } DatabaseFixer(GraphWrapper graphWrapper); void fix(); Optional<Edge> getPreviousVersion(Edge edge); }
DatabaseFixer { public void fix() { Graph graph = graphWrapper .getGraph(); fixEdges(graph); fixVertices(graph); } DatabaseFixer(GraphWrapper graphWrapper); void fix(); Optional<Edge> getPreviousVersion(Edge edge);  }