Skip to content

Instantly share code, notes, and snippets.

@rafarocha
Last active April 8, 2016 22:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rafarocha/893a96593d5591e9900ffd632dc61b92 to your computer and use it in GitHub Desktop.
Save rafarocha/893a96593d5591e9900ffd632dc61b92 to your computer and use it in GitHub Desktop.
import org.junit.Before;
import org.junit.Test;
import com.thinkaurelius.titan.core.TitanGraph;
import com.tinkerpop.frames.FramedGraph;
import com.tinkerpop.frames.FramedGraphFactory;
import com.tinkerpop.frames.domain.classes.Person;
import com.tinkerpop.frames.modules.gremlingroovy.GremlinGroovyModule;
public class TitanGraphTest {
private TitanGraph graph; // org.apache.tinkerpop.gremlin.structure.Graph
private FramedGraph framedGraph; // com.tinkerpop.blueprints.Graph
@Before public void before() {
FramedGraphFactory factory = new FramedGraphFactory(new GremlinGroovyModule());
this.framedGraph = factory.create(null);
}
@Test public void test() {
Person person = (Person) framedGraph.addVertex(null, Person.class);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment