Package org.apache.tinkerpop.gremlin
Class TestHelper
- java.lang.Object
- 
- org.apache.tinkerpop.gremlin.util.TestSupport
- 
- org.apache.tinkerpop.gremlin.TestHelper
 
 
- 
 public final class TestHelper extends TestSupport Utility methods for test development.- Author:
- Stephen Mallette (http://stephen.genoprime.com) NOTE: This class duplicates the TestHelper class from gremlin-core. One of them must be removed.
 
- 
- 
Field SummaryFields Modifier and Type Field Description static RandomRANDOM- 
Fields inherited from class org.apache.tinkerpop.gremlin.util.TestSupportTEST_DATA_RELATIVE_DIR
 
- 
 - 
Method SummaryAll Methods Static Methods Concrete Methods Modifier and Type Method Description static voidassumeNonDeterministic()Used at the start of a test to make it one that should only be executed when theassertNonDeterministicsystem property is set totrue.static StringconvertToRelative(Class clazz, File f)static voidcreateRandomGraph(Graph graph, int numberOfVertices, int maxNumberOfEdgesPerVertex)static voidvalidateEdgeEquality(Edge originalEdge, Edge otherEdge)static voidvalidateEquality(Object original, Object other)static voidvalidatePropertyEquality(Property originalProperty, Property otherProperty)static voidvalidateVertexEquality(Vertex originalVertex, Vertex otherVertex, boolean testEdges)static voidvalidateVertexPropertyEquality(VertexProperty originalVertexProperty, VertexProperty otherVertexProperty)- 
Methods inherited from class org.apache.tinkerpop.gremlin.util.TestSupportcleanPathSegment, generateTempFile, generateTempFileFromResource, generateTempFileFromResource, generateTempFileFromResource, getRootOfBuildDirectory, makeTestDataDirectory, makeTestDataFile, makeTestDataFile, makeTestDataPath
 
- 
 
- 
- 
- 
Field Detail- 
RANDOMpublic static final Random RANDOM 
 
- 
 - 
Method Detail- 
assumeNonDeterministicpublic static void assumeNonDeterministic() Used at the start of a test to make it one that should only be executed when theassertNonDeterministicsystem property is set totrue. Tests that call this method are ones that may sometimes fail in certain environments or behave in other random ways. Usually such tests should be removed or re-worked, but there are situations where that may not be possible as there is no other good way to test the feature. In these cases, the tests won't fail a standard build. For this benefit, the downside is that the feature isn't tested as often as it would otherwise, since theassertNonDeterministicoption is not used often and definitely not in automated builds like Travis.
 - 
validateVertexEqualitypublic static void validateVertexEquality(Vertex originalVertex, Vertex otherVertex, boolean testEdges) 
 - 
validateVertexPropertyEqualitypublic static void validateVertexPropertyEquality(VertexProperty originalVertexProperty, VertexProperty otherVertexProperty) 
 - 
validatePropertyEqualitypublic static void validatePropertyEquality(Property originalProperty, Property otherProperty) 
 - 
createRandomGraphpublic static void createRandomGraph(Graph graph, int numberOfVertices, int maxNumberOfEdgesPerVertex) 
 
- 
 
-