Repository: tinkerpop Updated Branches: refs/heads/TINKERPOP-1784 4b73a06d8 -> b520a378e
TINKERPOP-1784 Added feature tests for coalesce() Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/b520a378 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/b520a378 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/b520a378 Branch: refs/heads/TINKERPOP-1784 Commit: b520a378e783633c87dadd9e8f92e5d213a1e558 Parents: 4b73a06 Author: Stephen Mallette <[email protected]> Authored: Thu Nov 2 07:52:49 2017 -0400 Committer: Stephen Mallette <[email protected]> Committed: Thu Nov 2 07:52:49 2017 -0400 ---------------------------------------------------------------------- gremlin-test/features/map/Coalesce.feature | 78 +++++++++++++++++++++++++ 1 file changed, 78 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/b520a378/gremlin-test/features/map/Coalesce.feature ---------------------------------------------------------------------- diff --git a/gremlin-test/features/map/Coalesce.feature b/gremlin-test/features/map/Coalesce.feature new file mode 100644 index 0000000..f7786ff --- /dev/null +++ b/gremlin-test/features/map/Coalesce.feature @@ -0,0 +1,78 @@ +# 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 - coalesce() + + Scenario: g_V_coalesceXoutXfooX_outXbarXX + Given the modern graph + And the traversal of + """ + g.V().coalesce(__.out("foo"), __.out("bar")) + """ + When iterated to list + Then the result should be empty + + Scenario: g_VX1X_coalesceXoutXknowsX_outXcreatedXX_valuesXnameX + Given the modern graph + And using the parameter v1Id defined as "v[marko].id" + And the traversal of + """ + g.V(v1Id).coalesce(__.out("knows"), __.out("created")).values("name") + """ + When iterated to list + Then the result should be unordered + | result | + | vadas | + | josh | + + Scenario: g_VX1X_coalesceXoutXcreatedX_outXknowsXX_valuesXnameX + Given the modern graph + And using the parameter v1Id defined as "v[marko].id" + And the traversal of + """ + g.V(v1Id).coalesce(__.out("created"), __.out("knows")).values("name") + """ + When iterated to list + Then the result should be unordered + | result | + | lop | + + Scenario: g_V_coalesceXoutXlikesX_outXknowsX_inXcreatedXX_groupCount_byXnameX + Given the modern graph + And the traversal of + """ + g.V().coalesce(__.out("likes"), __.out("knows"), __.out("created")).groupCount().by("name") + """ + When iterated to list + Then the result should be unordered + | result | + | m[{"ripple":1, "vadas":1, "josh":1, "lop":2}] | + + Scenario: g_V_coalesceXoutEXknowsX_outEXcreatedXX_otherV_path_byXnameX_byXlabelX + Given the modern graph + And the traversal of + """ + g.V().coalesce(__.outE("knows"), __.outE("created")).otherV().path().by("name").by(T.label) + """ + When iterated to list + Then the result should be unordered + | result | + | p[marko,knows,vadas] | + | p[marko,knows,josh] | + | p[josh,created,ripple] | + | p[josh,created,lop] | + | p[peter,created,lop] |
