TINKERPOP-1784 Added feature tests for or()

Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/0d0cd967
Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/0d0cd967
Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/0d0cd967

Branch: refs/heads/TINKERPOP-1784
Commit: 0d0cd967199f01fff9a0391994dfef6c72de0115
Parents: a9a7a43
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Fri Oct 20 14:06:15 2017 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Thu Nov 2 13:37:23 2017 -0400

----------------------------------------------------------------------
 gremlin-test/features/filter/Or.feature         | 59 ++++++++++++++++++++
 .../gremlin/process/FeatureCoverageTest.java    |  2 +
 2 files changed, 61 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/0d0cd967/gremlin-test/features/filter/Or.feature
----------------------------------------------------------------------
diff --git a/gremlin-test/features/filter/Or.feature 
b/gremlin-test/features/filter/Or.feature
new file mode 100644
index 0000000..111315a
--- /dev/null
+++ b/gremlin-test/features/filter/Or.feature
@@ -0,0 +1,59 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+Feature: Step - or()
+
+  Scenario: g_V_orXhasXage_gt_27X__outE_count_gte_2X_name
+    Given the modern graph
+    And the traversal of
+      """
+      g.V().or(__.has("age", P.gt(27)), 
__.outE().count().is(P.gte(2l))).values("name")
+      """
+    When iterated to list
+    Then the result should be unordered
+      | marko |
+      | josh  |
+      | peter |
+
+  Scenario: g_V_orXoutEXknowsX__hasXlabel_softwareX_or_hasXage_gte_35XX_name
+    Given the modern graph
+    And the traversal of
+      """
+      g.V().or(__.outE("knows"), __.has(T.label, "software").or().has("age", 
P.gte(35))).values("name")
+      """
+    When iterated to list
+    Then the result should be unordered
+      | marko |
+      | ripple |
+      | lop  |
+      | peter |
+
+  Scenario: g_V_asXaX_orXselectXaX_selectXaXX
+    Given the modern graph
+    And the traversal of
+      """
+      g.V().as("a").or(__.select("a"), __.select("a"))
+      """
+    When iterated to list
+    Then the result should be unordered
+      | v[marko] |
+      | v[vadas] |
+      | v[lop] |
+      | v[josh] |
+      | v[ripple] |
+      | v[peter]  |
+

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/0d0cd967/gremlin-test/src/test/java/org/apache/tinkerpop/gremlin/process/FeatureCoverageTest.java
----------------------------------------------------------------------
diff --git 
a/gremlin-test/src/test/java/org/apache/tinkerpop/gremlin/process/FeatureCoverageTest.java
 
b/gremlin-test/src/test/java/org/apache/tinkerpop/gremlin/process/FeatureCoverageTest.java
index 97f1fd6..282d8a8 100644
--- 
a/gremlin-test/src/test/java/org/apache/tinkerpop/gremlin/process/FeatureCoverageTest.java
+++ 
b/gremlin-test/src/test/java/org/apache/tinkerpop/gremlin/process/FeatureCoverageTest.java
@@ -24,6 +24,7 @@ import 
org.apache.tinkerpop.gremlin.process.traversal.step.branch.OptionalTest;
 import org.apache.tinkerpop.gremlin.process.traversal.step.filter.CoinTest;
 import org.apache.tinkerpop.gremlin.process.traversal.step.filter.DropTest;
 import org.apache.tinkerpop.gremlin.process.traversal.step.filter.IsTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.filter.OrTest;
 import org.apache.tinkerpop.gremlin.process.traversal.step.map.CountTest;
 import org.apache.tinkerpop.gremlin.process.traversal.step.map.PathTest;
 import org.apache.tinkerpop.gremlin.process.traversal.step.map.ProjectTest;
@@ -75,6 +76,7 @@ public class FeatureCoverageTest {
                 CoinTest.class,
                 DropTest.class,
                 IsTest.class,
+                OrTest.class,
                 // map
                 CountTest.class,
                 PathTest.class,

Reply via email to