tinkerpop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jorg...@apache.org
Subject [12/50] [abbrv] tinkerpop git commit: changed the SubgraphTest to use process API in assertions instead of structure API. This is in line with the current refactor trend to make sure the process API (and test suite) does not leak into the structure API.
Date Wed, 22 Nov 2017 14:47:05 GMT
changed the SubgraphTest to use process API in assertions instead of structure API. This is
in line with the current refactor trend to make sure the process API (and test suite) does
not leak into the structure API. We need clear boundaries between the two APIs.


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

Branch: refs/heads/TINKERPOP-1489
Commit: 797937eb0c0b0fa3bc177925f4e584dfd53d8f13
Parents: f2b4fb9
Author: Marko A. Rodriguez <okrammarko@gmail.com>
Authored: Thu Nov 2 10:07:10 2017 -0600
Committer: Marko A. Rodriguez <okrammarko@gmail.com>
Committed: Thu Nov 2 10:07:10 2017 -0600

----------------------------------------------------------------------
 .../process/traversal/step/sideEffect/SubgraphTest.java | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/797937eb/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/sideEffect/SubgraphTest.java
----------------------------------------------------------------------
diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/sideEffect/SubgraphTest.java
b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/sideEffect/SubgraphTest.java
index 9f2a662..51d8870 100644
--- a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/sideEffect/SubgraphTest.java
+++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/sideEffect/SubgraphTest.java
@@ -71,15 +71,15 @@ public abstract class SubgraphTest extends AbstractGremlinProcessTest
{
         assertVertexEdgeCounts(subgraph, 3, 2);
         subgraph.edges().forEachRemaining(e -> {
             assertEquals("knows", e.label());
-            assertEquals("marko", e.outVertex().values("name").next());
-            assertEquals(new Integer(29), e.outVertex().<Integer>values("age").next());
-            assertEquals("person", e.outVertex().label());
+            assertEquals("marko", g.E(e).outV().values("name").next());
+            assertEquals(new Integer(29), g.E(e).outV().<Integer>values("age").next());
+            assertEquals("person", g.E(e).outV().label().next());
 
-            final String name = e.inVertex().<String>values("name").next();
+            final String name = g.E(e).inV().<String>values("name").next();
             if (name.equals("vadas"))
-                assertEquals(0.5d, e.value("weight"), 0.0001d);
+                assertEquals(0.5d, g.E(e).<Double>values("weight").next(), 0.0001d);
             else if (name.equals("josh"))
-                assertEquals(1.0d, e.value("weight"), 0.0001d);
+                assertEquals(1.0d, g.E(e).<Double>values("weight").next(), 0.0001d);
             else
                 fail("There's a vertex present that should not be in the subgraph");
         });


Mime
View raw message