public class GraphContext extends GraphLoader implements org.junit.rules.TestRule
Sets up graphs for testing
Contains utility methods and statically initialized environment variables to control
Grakn unit tests.
This specific class extend GraphLoader and starts Cassandra instance via
EmbeddedCassandra if needed.
| Modifier and Type | Method and Description |
|---|---|
org.junit.runners.model.Statement |
apply(org.junit.runners.model.Statement base,
org.junit.runner.Description description) |
GraphContext |
assumeTrue(boolean bool) |
static GraphContext |
empty() |
static void |
loadFromFile(GraknGraph graph,
String file) |
static GraphContext |
preLoad(java.util.function.Consumer<GraknGraph> build) |
static GraphContext |
preLoad(String... files) |
graph, load, randomKeyspace, rollbackpublic static GraphContext empty()
public static GraphContext preLoad(java.util.function.Consumer<GraknGraph> build)
public static GraphContext preLoad(String... files)
public GraphContext assumeTrue(boolean bool)
public static void loadFromFile(GraknGraph graph, String file)
public org.junit.runners.model.Statement apply(org.junit.runners.model.Statement base,
org.junit.runner.Description description)
apply in interface org.junit.rules.TestRuleCopyright © 2017 Grakn Labs Ltd. All rights reserved.