use of com.tinkerpop.frames.domain.classes.Person in project frames by tinkerpop.
the class JavaHandlerTest method testMethodNotImplemented.
@Test(expected = JavaHandlerException.class)
public void testMethodNotImplemented() {
Person person = g.getVertex(1, Person.class);
person.notImplemented();
}
use of com.tinkerpop.frames.domain.classes.Person in project frames by tinkerpop.
the class FramedVertexTest method testDeprecatedKnowsPeople.
@Test
public void testDeprecatedKnowsPeople() {
Person marko = framedGraph.frame(graph.getVertex(1), Person.class);
assertEquals(newHashSet(vadas, josh), newHashSet(marko.getDeprecatedKnowsPeople()));
}
use of com.tinkerpop.frames.domain.classes.Person in project frames by tinkerpop.
the class FramedVertexTest method testBooleanGetMethods.
@Test
public void testBooleanGetMethods() {
Person marko = framedGraph.frame(graph.getVertex(1), Person.class);
marko.setBoolean(true);
assertTrue(marko.isBoolean());
assertTrue(marko.isBooleanPrimitive());
assertTrue(marko.canBoolean());
assertTrue(marko.canBooleanPrimitive());
}
use of com.tinkerpop.frames.domain.classes.Person in project frames by tinkerpop.
the class FrameInitializerTest method testEdgeInitialization.
@Test
public void testEdgeInitialization() {
Person person1 = framedGraph.addVertex(null, Person.class);
Person person2 = framedGraph.addVertex(null, Person.class);
person1.addKnows(person2);
assertEquals(Float.valueOf(1.0f), person1.getKnows().iterator().next().getWeight());
}
use of com.tinkerpop.frames.domain.classes.Person in project frames by tinkerpop.
the class FrameInitializerTest method testDeprecatedRegistration.
@Test
public void testDeprecatedRegistration() {
Graph graph = TinkerGraphFactory.createTinkerGraph();
FramedGraph<Graph> framedGraph = new FramedGraph(graph);
framedGraph.registerFrameInitializer(nameDefaulter);
Person person = framedGraph.addVertex(null, Person.class);
assertEquals("Defaulted", person.getName());
}
Aggregations