}
public void testCreateFrame() {
Graph graph = new TinkerGraph();
FramedGraph<Graph> framedGraph = new FramedGraphFactory().create(graph);
Person person = framedGraph.addVertex(null, Person.class);
assertEquals(person.asVertex(), graph.getVertices().iterator().next());
int counter = 0;
for (Vertex v : graph.getVertices()) {
counter++;
}
assertEquals(counter, 1);
counter = 0;
for (Edge e : graph.getEdges()) {
counter++;
}
assertEquals(counter, 0);
Person person2 = framedGraph.addVertex("aPerson", Person.class);
assertEquals(person2.asVertex().getId(), "aPerson");
counter = 0;
for (Vertex v : graph.getVertices()) {
counter++;
}
assertEquals(counter, 2);