@Test public void execute() { ChangesOperation changesOperation = new ChangesOperation(); SetResult<Vertex> result = changesOperation.execute(builder.getGraph()); Set<Vertex> changes = result.get(); assertNotNull(changes); assertEquals(2, changes.size()); assertTrue(changes.contains(new Vertex.Builder("ClassA", "coveredMethod()").build())); assertTrue(changes.contains(new Vertex.Builder("ClassA", "uncoveredMethod()").build())); }
@Override public SetResult<Vertex> execute(Graph<Vertex, Edge> graph) { return new SetResult<>(emptyIfFalse(graph.containsVertex(END_VERTEX), () -> graph.edgesOf(END_VERTEX).stream().map(Edge::getTarget))); }
ChangesOperation extends AbstractGraphOperation<SetResult<Vertex>> { @Override public SetResult<Vertex> execute(Graph<Vertex, Edge> graph) { return new SetResult<>(emptyIfFalse(graph.containsVertex(END_VERTEX), () -> graph.edgesOf(END_VERTEX).stream().map(Edge::getTarget))); } }
ChangesOperation extends AbstractGraphOperation<SetResult<Vertex>> { @Override public SetResult<Vertex> execute(Graph<Vertex, Edge> graph) { return new SetResult<>(emptyIfFalse(graph.containsVertex(END_VERTEX), () -> graph.edgesOf(END_VERTEX).stream().map(Edge::getTarget))); } ChangesOperation(); }
ChangesOperation extends AbstractGraphOperation<SetResult<Vertex>> { @Override public SetResult<Vertex> execute(Graph<Vertex, Edge> graph) { return new SetResult<>(emptyIfFalse(graph.containsVertex(END_VERTEX), () -> graph.edgesOf(END_VERTEX).stream().map(Edge::getTarget))); } ChangesOperation(); @Override SetResult<Vertex> execute(Graph<Vertex, Edge> graph); }
ChangesOperation extends AbstractGraphOperation<SetResult<Vertex>> { @Override public SetResult<Vertex> execute(Graph<Vertex, Edge> graph) { return new SetResult<>(emptyIfFalse(graph.containsVertex(END_VERTEX), () -> graph.edgesOf(END_VERTEX).stream().map(Edge::getTarget))); } ChangesOperation(); @Override SetResult<Vertex> execute(Graph<Vertex, Edge> graph);  }