public abstract class AbstractGremlinTest extends Object
Modifier and Type | Field and Description |
---|---|
protected Configuration |
config |
protected GraphTraversalSource |
g |
protected Graph |
graph |
protected GraphProvider |
graphProvider |
TestName |
name |
Constructor and Description |
---|
AbstractGremlinTest() |
Modifier and Type | Method and Description |
---|---|
protected void |
afterLoadGraphWith(Graph g) |
static void |
assertVertexEdgeCounts(Graph graph,
int expectedVertexCount,
int expectedEdgeCount) |
protected void |
beforeLoadGraphWith(Graph g) |
Object |
convertToEdgeId(Graph graph,
String outVertexName,
String edgeLabel,
String inVertexName) |
Object |
convertToEdgeId(String outVertexName,
String edgeLabel,
String inVertexName) |
Vertex |
convertToVertex(Graph graph,
String vertexName) |
Object |
convertToVertexId(Graph graph,
String vertexName)
Looks up the identifier as generated by the current source graph being tested.
|
Object |
convertToVertexId(String vertexName)
Looks up the identifier as generated by the current source graph being tested.
|
GraphTraversal<Vertex,VertexProperty<Object>> |
convertToVertexProperty(Graph graph,
String vertexName,
String vertexPropertyKey) |
GraphTraversal<Vertex,Object> |
convertToVertexPropertyId(Graph graph,
String vertexName,
String vertexPropertyKey) |
GraphTraversal<Vertex,Object> |
convertToVertexPropertyId(String vertexName,
String vertexPropertyKey) |
static Consumer<Graph> |
getAssertVertexEdgeCounts(int expectedVertexCount,
int expectedEdgeCount) |
void |
printTraversalForm(Traversal traversal) |
void |
setup() |
void |
tearDown() |
void |
tryCommit(Graph graph)
Utility method that commits if the graph supports transactions.
|
void |
tryCommit(Graph graph,
Consumer<Graph> assertFunction)
Utility method that commits if the graph supports transactions and executes an assertion function before and
after the commit.
|
void |
tryRandomCommit(Graph graph)
Deprecated.
as of 3.1.1-incubating, and is not replaced
|
void |
tryRollback(Graph graph)
Utility method that rollsback if the graph supports transactions.
|
static void |
validateException(Throwable expected,
Throwable actual) |
static void |
verifyUniqueStepIds(Traversal.Admin<?,?> traversal) |
protected Graph graph
protected GraphTraversalSource g
protected Configuration config
protected GraphProvider graphProvider
public TestName name
public Object convertToVertexId(String vertexName)
vertexName
- a unique string that will identify a graph element within a graphpublic Object convertToVertexId(Graph graph, String vertexName)
graph
- the graph to get the element id fromvertexName
- a unique string that will identify a graph element within a graphpublic GraphTraversal<Vertex,Object> convertToVertexPropertyId(String vertexName, String vertexPropertyKey)
public GraphTraversal<Vertex,Object> convertToVertexPropertyId(Graph graph, String vertexName, String vertexPropertyKey)
public GraphTraversal<Vertex,VertexProperty<Object>> convertToVertexProperty(Graph graph, String vertexName, String vertexPropertyKey)
public Object convertToEdgeId(String outVertexName, String edgeLabel, String inVertexName)
public Object convertToEdgeId(Graph graph, String outVertexName, String edgeLabel, String inVertexName)
public void tryCommit(Graph graph)
public void tryRandomCommit(Graph graph)
public void tryCommit(Graph graph, Consumer<Graph> assertFunction)
public void tryRollback(Graph graph)
public void printTraversalForm(Traversal traversal)
public static void assertVertexEdgeCounts(Graph graph, int expectedVertexCount, int expectedEdgeCount)
public static Consumer<Graph> getAssertVertexEdgeCounts(int expectedVertexCount, int expectedEdgeCount)
public static void verifyUniqueStepIds(Traversal.Admin<?,?> traversal)
Copyright © 2013–2016 Apache Software Foundation. All rights reserved.