1

Is there a way to create a fake Tinkerpop Bluerint Vertex and Edge in Java without being part of a database?

Thanks

Michail Michailidis
  • 11,792
  • 6
  • 63
  • 106

1 Answers1

0

I would recommend using an in-memory TinkerGraph. It offers a graph implementation (including vertexes and edges), but it lacks transactions and persistence.

Mohamed Taher Alrefaie
  • 15,698
  • 9
  • 48
  • 66
Jason Plurad
  • 6,682
  • 2
  • 18
  • 37
  • Thanks..This is what I am currently doing through OrientDB.. But I wouldn't want to involve any database at all since I am trying to test code that gets a vertex and its connected neighbors through edges and converts them to a hierarchy of java class objects.. I need to write unit tests and not integration tests that I already have.. – Michail Michailidis Sep 29 '15 at 15:10
  • 1
    I saw from the tests of Blueprint Frames that they do ```Graph wrapper = Mockito.mock(Graph.class);``` ```Vertex vertex = Mockito.mock(Vertex.class);``` ```Mockito.when(wrapper.getVertex(1)).thenReturn(vertex);``` I wonder how flexible this is.. https://github.com/tinkerpop/frames/blob/master/src/test/java/com/tinkerpop/frames/FramedGraphFactoryTest.java – Michail Michailidis Sep 29 '15 at 15:19