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/02 17:38:02 UTC

[05/50] tinkerpop git commit: TINKERPOP-1784 Added more select() tests

TINKERPOP-1784 Added more select() tests


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

Branch: refs/heads/TINKERPOP-1784
Commit: 67ae4ba699a012f9cb9492738fc5a0e3a44d5d74
Parents: b63ac83
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Thu Oct 5 09:23:09 2017 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Thu Nov 2 13:37:22 2017 -0400

----------------------------------------------------------------------
 gremlin-test/features/map/Select.feature | 89 +++++++++++++++++++++++++--
 1 file changed, 85 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/67ae4ba6/gremlin-test/features/map/Select.feature
----------------------------------------------------------------------
diff --git a/gremlin-test/features/map/Select.feature b/gremlin-test/features/map/Select.feature
index 9166954..13114d5 100644
--- a/gremlin-test/features/map/Select.feature
+++ b/gremlin-test/features/map/Select.feature
@@ -17,14 +17,95 @@
 
 Feature: Step - select()
 
-  Scenario: Select vertices
+  Scenario: get_g_VX1X_asXaX_outXknowsX_asXbX_selectXa_bX
     Given the modern graph
-    And using the parameter v1 is "v[marko]"
+    And using the parameter v1Id is "v[marko].id"
     And the traversal of
       """
-      g.V(v1).as("a").out("knows").as("b").select("a", "b")
+      g.V(v1Id).as("a").out("knows").as("b").select("a", "b")
       """
     When iterated to list
     Then the result should be unordered
       | m[{"a": "v[marko]", "b": "v[vadas]"}] |
-      | m[{"a": "v[marko]", "b": "v[josh]"}] |
\ No newline at end of file
+      | m[{"a": "v[marko]", "b": "v[josh]"}] |
+
+  Scenario: g_VX1X_asXaX_outXknowsX_asXbX_selectXa_bX_byXnameX
+    Given the modern graph
+    And using the parameter v1Id is "v[marko].id"
+    And the traversal of
+      """
+      g.V(v1Id).as("a").out("knows").as("b").select("a", "b").by("name")
+      """
+    When iterated to list
+    Then the result should be unordered
+      | m[{"a": "marko", "b": "vadas"}] |
+      | m[{"a": "marko", "b": "josh"}] |
+
+  Scenario: g_VX1X_asXaX_outXknowsX_asXbX_selectXaX
+    Given the modern graph
+    And using the parameter v1Id is "v[marko].id"
+    And the traversal of
+      """
+      g.V(v1Id).as("a").out("knows").as("b").select("a")
+      """
+    When iterated to list
+    Then the result should be unordered
+      | v[marko] |
+      | v[marko] |
+
+  Scenario: g_VX1X_asXaX_outXknowsX_asXbX_selectXaX_byXnameX
+    Given the modern graph
+    And using the parameter v1Id is "v[marko].id"
+    And the traversal of
+      """
+      g.V(v1Id).as("a").out("knows").as("b").select("a").by("name")
+      """
+    When iterated to list
+    Then the result should be unordered
+      | marko |
+      | marko |
+
+  Scenario: g_V_asXaX_out_asXbX_selectXa_bX_byXnameX
+    Given the modern graph
+    And the traversal of
+      """
+      g.V().as("a").out().as("b").select("a", "b").by("name")
+      """
+    When iterated to list
+    Then the result should be unordered
+      | m[{"a": "marko", "b": "lop"}] |
+      | m[{"a": "marko", "b": "vadas"}] |
+      | m[{"a": "marko", "b": "josh"}] |
+      | m[{"a": "josh", "b": "ripple"}] |
+      | m[{"a": "josh", "b": "lop"}] |
+      | m[{"a": "peter", "b": "lop"}] |
+
+  Scenario: g_V_asXaX_out_aggregateXxX_asXbX_selectXa_bX_byXnameX
+    Given the modern graph
+    And the traversal of
+      """
+      g.V().as("a").out().aggregate("x").as("b").select("a", "b").by("name")
+      """
+    When iterated to list
+    Then the result should be unordered
+      | m[{"a": "marko", "b": "lop"}] |
+      | m[{"a": "marko", "b": "vadas"}] |
+      | m[{"a": "marko", "b": "josh"}] |
+      | m[{"a": "josh", "b": "ripple"}] |
+      | m[{"a": "josh", "b": "lop"}] |
+      | m[{"a": "peter", "b": "lop"}] |
+
+  Scenario: g_V_asXaX_name_order_asXbX_selectXa_bX_byXnameX_by_XitX
+    Given the modern graph
+    And the traversal of
+      """
+      g.V().as("a").values("name").order().as("b").select("a", "b").by("name").by()
+      """
+    When iterated to list
+    Then the result should be unordered
+      | m[{"a": "marko", "b": "marko"}] |
+      | m[{"a": "vadas", "b": "vadas"}] |
+      | m[{"a": "josh", "b": "josh"}] |
+      | m[{"a": "ripple", "b": "ripple"}] |
+      | m[{"a": "lop", "b": "lop"}] |
+      | m[{"a": "peter", "b": "peter"}] |
\ No newline at end of file