public final class TestHelper extends TestSupport
Modifier and Type | Field and Description |
---|---|
static Random |
RANDOM |
TEST_DATA_RELATIVE_DIR
Modifier and Type | Method and Description |
---|---|
static void |
assumeNonDeterministic()
Used at the start of a test to make it one that should only be executed when the
assertNonDeterministic
system property is set to true . |
static String |
convertToRelative(Class clazz,
File f) |
static void |
createRandomGraph(Graph graph,
int numberOfVertices,
int maxNumberOfEdgesPerVertex) |
static void |
validateEdgeEquality(Edge originalEdge,
Edge otherEdge) |
static void |
validateEquality(Object original,
Object other) |
static void |
validatePropertyEquality(Property originalProperty,
Property otherProperty) |
static void |
validateVertexEquality(Vertex originalVertex,
Vertex otherVertex,
boolean testEdges) |
static void |
validateVertexPropertyEquality(VertexProperty originalVertexProperty,
VertexProperty otherVertexProperty) |
cleanPathSegment, generateTempFile, generateTempFileFromResource, generateTempFileFromResource, generateTempFileFromResource, getRootOfBuildDirectory, makeTestDataDirectory, makeTestDataFile, makeTestDataFile, makeTestDataPath
public static final Random RANDOM
public static void assumeNonDeterministic()
assertNonDeterministic
system property is set to true
. 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 the assertNonDeterministic
option is not used often and definitely not in
automated builds like Travis.public static void validateVertexEquality(Vertex originalVertex, Vertex otherVertex, boolean testEdges)
public static void validateVertexPropertyEquality(VertexProperty originalVertexProperty, VertexProperty otherVertexProperty)
public static void validatePropertyEquality(Property originalProperty, Property otherProperty)
public static void createRandomGraph(Graph graph, int numberOfVertices, int maxNumberOfEdgesPerVertex)
Copyright © 2013–2022 Apache Software Foundation. All rights reserved.