public class SampleKBContext extends CompositeTestRule
Sets up graphs for testing
Contains utility methods and statically initialized environment variables to control
Grakn unit tests.
This specific class extend SampleKBLoader and starts Cassandra instance via
EmbeddedCassandraContext if needed.
| Modifier and Type | Method and Description |
|---|---|
static SampleKBContext |
empty() |
static SampleKBContext |
load(java.util.function.Consumer<ai.grakn.GraknTx> build) |
static SampleKBContext |
load(String... files) |
void |
rollback() |
protected List<org.junit.rules.TestRule> |
testRules() |
EmbeddedGraknTx<?> |
tx() |
after, apply, beforepublic static SampleKBContext empty()
public static SampleKBContext load(java.util.function.Consumer<ai.grakn.GraknTx> build)
public static SampleKBContext load(String... files)
protected List<org.junit.rules.TestRule> testRules()
testRules in class CompositeTestRulepublic EmbeddedGraknTx<?> tx()
public void rollback()
Copyright © 2018 Grakn Labs Ltd. All rights reserved.