assertEquals(framedGraph.frame(graph.getVertex(1), Person.class), framedGraph.getVertex(1, Person.class));
assertEquals(framedGraph.frame(graph.getEdge(7), Knows.class), framedGraph.getEdge(7, Knows.class));
}
public void testFrameVertices() {
Graph graph = TinkerGraphFactory.createTinkerGraph();
FramedGraph<Graph> framedGraph = new FramedGraphFactory().create(graph);
int counter = 0;
for (Person person : framedGraph.getVertices("name", "marko", Person.class)) {
counter++;
assertEquals(person.getName(), "marko");
}
assertEquals(counter, 1);
counter = 0;
for (Project project : framedGraph.frameVertices(graph.getVertices("lang", "java"), Project.class)) {
counter++;
assertTrue(project.getName().equals("lop") || project.getName().equals("ripple"));
}
assertEquals(counter, 2);