You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by sp...@apache.org on 2021/09/15 13:20:41 UTC

[tinkerpop] 10/21: TINKERPOP-2601 Added further provider documentation on Gherkin tests

This is an automated email from the ASF dual-hosted git repository.

spmallette pushed a commit to branch TINKERPOP-2601
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git

commit 131cb0259b336284c4ee94d8fe83c71f70f658d6
Author: Stephen Mallette <st...@amazon.com>
AuthorDate: Wed Sep 8 12:44:15 2021 -0400

    TINKERPOP-2601 Added further provider documentation on Gherkin tests
---
 docs/src/dev/provider/index.asciidoc | 15 +++++++++++----
 1 file changed, 11 insertions(+), 4 deletions(-)

diff --git a/docs/src/dev/provider/index.asciidoc b/docs/src/dev/provider/index.asciidoc
index 480dee0..91e40d8 100644
--- a/docs/src/dev/provider/index.asciidoc
+++ b/docs/src/dev/provider/index.asciidoc
@@ -854,14 +854,14 @@ Guice. To follow this approach include the following module:
 </dependency>
 ----
 
-Following the TinkerGraph implementation, there are two classes to construct:
+Following the Neo4jGraph implementation, there are two classes to construct:
 
 [source,java]
 ----
 public class ServiceModule extends AbstractModule {
     @Override
     protected void configure() {
-        bind(World.class).to(TinkerGraphWorld.class);
+        bind(World.class).to(Neo4jGraphWorld.class);
     }
 }
 
@@ -873,7 +873,7 @@ public class WorldInjectorSource implements InjectorSource {
 }
 ----
 
-The key here is that the `TinkerGraphWorld` implementation gets bound to `World` in the `ServiceModule` and there is
+The key here is that the `Neo4jGraphWorld` implementation gets bound to `World` in the `ServiceModule` and there is
 a `WorldInjectorSource` that specifies the `ServiceModule` to Cucumber. As a final step, the provider's test resources
 needs a `cucumber.properties` file with an entry that specifies the `InjectorSource` so that Guice can find it. Here
 is the example taken from TinkerGraph where the `WorldInjectorSource` is inner class of `TinkerGraphFeatureTest`
@@ -881,9 +881,16 @@ itself.
 
 [source,text]
 ----
-guice.injector-source=org.apache.tinkerpop.gremlin.tinkergraph.TinkerGraphFeatureTest$WorldInjectorSource
+guice.injector-source=org.apache.tinkerpop.gremlin.neo4j.Neo4jGraphFeatureTest$WorldInjectorSource
 ----
 
+In the event that a single `World` configuration is insufficient, it may be necessary to develop a custom
+`ObjectFactory`. An easy way to do this is to create a class that extends from the `AbstractGuiceFactory` in
+`gremlin-test` and provide that class to the `@CucumberOptions`. This approach does rely on the `ServiceLoader` which
+means it will be important to include a `io.cucumber.core.backend.ObjectFactory` file in `META-INF/services` and an
+entry that registers the custom implementation. Please see the TinkerGraph test code for further information on this
+approach.
+
 === Accessibility via GremlinPlugin
 
 image:gremlin-plugin.png[width=100,float=left] The applications distributed with TinkerPop do not distribute with