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 2017/11/11 00:56:28 UTC

[24/50] tinkerpop git commit: TINKERPOP-1784 Added valueMap() feature tests

TINKERPOP-1784 Added valueMap() feature tests


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

Branch: refs/heads/TINKERPOP-1784
Commit: 0e229343d9518a2a147eb34a822254202c221b14
Parents: 8282262
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Fri Oct 20 13:57:59 2017 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Fri Nov 10 19:55:20 2017 -0500

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


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/0e229343/gremlin-test/features/map/ValueMap.feature
----------------------------------------------------------------------
diff --git a/gremlin-test/features/map/ValueMap.feature b/gremlin-test/features/map/ValueMap.feature
new file mode 100644
index 0000000..0a2220e
--- /dev/null
+++ b/gremlin-test/features/map/ValueMap.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 - valueMap()
+
+  Scenario: g_V_valueMap
+    Given the modern graph
+    And the traversal of
+      """
+      g.V().valueMap()
+      """
+    When iterated to list
+    Then the result should be unordered
+      | m[{"name": ["marko"], "age": [29]}] |
+      | m[{"name": ["josh"], "age": [32]}] |
+      | m[{"name": ["peter"], "age": [35]}] |
+      | m[{"name": ["vadas"], "age": [27]}] |
+      | m[{"name": ["lop"], "lang": ["java"]}] |
+      | m[{"name": ["ripple"], "lang": ["java"]}] |
+
+  Scenario: g_V_valueMapXname_ageX
+    Given the modern graph
+    And the traversal of
+      """
+      g.V().valueMap("name", "age")
+      """
+    When iterated to list
+    Then the result should be unordered
+      | m[{"name": ["marko"], "age": [29]}] |
+      | m[{"name": ["josh"], "age": [32]}] |
+      | m[{"name": ["peter"], "age": [35]}] |
+      | m[{"name": ["vadas"], "age": [27]}] |
+      | m[{"name": ["lop"]}] |
+      | m[{"name": ["ripple"]}] |
+
+  Scenario: g_VX1X_outXcreatedX_valueMap
+    Given the modern graph
+    And using the parameter v1Id defined as "v[marko].id"
+    And the traversal of
+      """
+      g.V(v1Id).out("created").valueMap()
+      """
+    When iterated to list
+    Then the result should be unordered
+      | m[{"name": ["lop"], "lang": ["java"]}] |
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/0e229343/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 eb62f77..97f1fd6 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
@@ -27,6 +27,7 @@ import org.apache.tinkerpop.gremlin.process.traversal.step.filter.IsTest;
 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;
+import org.apache.tinkerpop.gremlin.process.traversal.step.map.ValueMapTest;
 import org.apache.tinkerpop.gremlin.process.traversal.step.map.VertexTest;
 import org.apache.tinkerpop.gremlin.process.traversal.step.sideEffect.AggregateTest;
 import org.apache.tinkerpop.gremlin.process.traversal.step.sideEffect.GroupCountTest;
@@ -78,6 +79,7 @@ public class FeatureCoverageTest {
                 CountTest.class,
                 PathTest.class,
                 ProjectTest.class,
+                ValueMapTest.class,
                 VertexTest.class,
                 // sideEffect
                 AggregateTest.class,