public class GraknTxs extends AbstractGenerator<ai.grakn.GraknTx> implements com.pholser.junit.quickcheck.MinimalCounterexampleHook
GraknTxs.
Normally you want the GraknTx you generate to be open, not already closed. To get an open
GraknTx, annotate the parameter in your test with GraknTxs.Open.
Additionally, if your property test needs a concept from the GraknTx, use the annotation
FromTxGenerator.FromTx.
| Modifier and Type | Class and Description |
|---|---|
static interface |
GraknTxs.Open
Specify whether the generated tx should be open or closed
|
| Constructor and Description |
|---|
GraknTxs() |
| Modifier and Type | Method and Description |
|---|---|
static List<ai.grakn.concept.Concept> |
allConceptsFrom(ai.grakn.GraknTx graph) |
static java.util.stream.Stream<? extends ai.grakn.concept.Thing> |
allInstancesFrom(ai.grakn.GraknTx graph) |
static Collection<? extends ai.grakn.concept.SchemaConcept> |
allSchemaElementsFrom(ai.grakn.GraknTx graph) |
void |
configure(GraknTxs.Open open) |
ai.grakn.GraknTx |
generate() |
void |
handle(Object[] counterexample,
Runnable action) |
static ai.grakn.GraknTx |
lastGeneratedGraph() |
GraknTxs |
setOpen(boolean open) |
generate, listOf, setOfaddComponentGenerators, canGenerateForParametersOfTypes, canRegisterAsType, canShrink, compatibleWithTypeParameter, configurationAnnotationsOn, configure, configure, doShrink, gen, hasComponents, narrow, numberOfNeededComponents, provide, shrink, typespublic static ai.grakn.GraknTx lastGeneratedGraph()
public ai.grakn.GraknTx generate()
generate in class AbstractGenerator<ai.grakn.GraknTx>public void configure(GraknTxs.Open open)
public GraknTxs setOpen(boolean open)
public static List<ai.grakn.concept.Concept> allConceptsFrom(ai.grakn.GraknTx graph)
public static Collection<? extends ai.grakn.concept.SchemaConcept> allSchemaElementsFrom(ai.grakn.GraknTx graph)
public static java.util.stream.Stream<? extends ai.grakn.concept.Thing> allInstancesFrom(ai.grakn.GraknTx graph)
Copyright © 2018 Grakn Labs Ltd. All rights reserved.