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/04bd1810
Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/04bd1810
Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/04bd1810

Branch: refs/heads/TINKERPOP-1784
Commit: 04bd1810b6894b014c623d76895f12c5294327a1
Parents: 93bc52e
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Fri Oct 20 13:57:59 2017 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Mon Oct 30 13:23:35 2017 -0400

----------------------------------------------------------------------
 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/04bd1810/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/04bd1810/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,

Reply via email to