public interface World
@RunWith(Cucumber.class)
) and requires a dependency injection
package (e.g. guice
) to push an instance into the Cucumber execution.Modifier and Type | Method and Description |
---|---|
default void |
afterEachScenario()
Called after each individual test is executed allowing for cleanup of any open resources.
|
default void |
beforeEachScenario(io.cucumber.java.Scenario scenario)
Called before each individual test is executed which provides an opportunity to do some setup.
|
default String |
changePathToDataFile(String pathToFileFromGremlin)
Called when
g.io() is encountered in the Gherkin tests and allows the path to the data file to
referenced to be changed. |
GraphTraversalSource |
getGraphTraversalSource(LoadGraphWith.GraphData graphData)
Gets a
GraphTraversalSource that is backed by the specified LoadGraphWith.GraphData . |
GraphTraversalSource getGraphTraversalSource(LoadGraphWith.GraphData graphData)
GraphTraversalSource
that is backed by the specified LoadGraphWith.GraphData
. For null
, the
returned source should be an empty graph with no data in it. Tests do not mutate the standard graphs. Only tests
that use an empty graph will change its state.default void beforeEachScenario(io.cucumber.java.Scenario scenario)
scenario.getName()
and then throwing an AssumptionViolationException
.scenario
- default void afterEachScenario()
default String changePathToDataFile(String pathToFileFromGremlin)
g.io()
is encountered in the Gherkin tests and allows the path to the data file to
referenced to be changed. The default path will look something like: data/file.extension
and will
match one of the standard TinkerPop data files associated with the test framework. If the files need to be
located somewhere else for a particular provider, this method can alter the path as needed.pathToFileFromGremlin
- the path to a data file as taken from the Gherkin testsCopyright © 2013–2022 Apache Software Foundation. All rights reserved.