You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by ok...@apache.org on 2016/02/26 18:51:57 UTC

[28/32] incubator-tinkerpop git commit: Added some extra asserts to DetachedVertex in gremlin server

Added some extra asserts to DetachedVertex in gremlin server

Just further validating that detached works nicely even after serialization. CTR


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

Branch: refs/heads/TINKERPOP-1166
Commit: 5126697c62a014db46be2db8a01ba95fe92c6d1c
Parents: d414bcb
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Thu Feb 25 14:23:07 2016 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Thu Feb 25 14:23:07 2016 -0500

----------------------------------------------------------------------
 .../gremlin/server/GremlinResultSetIntegrateTest.java  | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/5126697c/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinResultSetIntegrateTest.java
----------------------------------------------------------------------
diff --git a/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinResultSetIntegrateTest.java b/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinResultSetIntegrateTest.java
index 4a8eca9..d8be42e 100644
--- a/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinResultSetIntegrateTest.java
+++ b/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinResultSetIntegrateTest.java
@@ -53,6 +53,7 @@ import static org.hamcrest.MatcherAssert.assertThat;
 import static org.hamcrest.core.IsInstanceOf.instanceOf;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNull;
+import static org.junit.Assert.fail;
 
 /**
  * @author Stephen Mallette (http://stephen.genoprime.com)
@@ -105,9 +106,19 @@ public class GremlinResultSetIntegrateTest extends AbstractGremlinServerIntegrat
 
     @Test
     public void shouldHandleVertexResult() throws Exception {
-        final ResultSet results = client.submit("g.V().next()");
+        final ResultSet results = client.submit("g.V(1).next()");
         final Vertex v = results.all().get().get(0).getVertex();
         assertThat(v, instanceOf(DetachedVertex.class));
+
+        assertEquals("marko", v.properties("name").next().value());
+        v.properties().forEachRemaining(p -> {
+            if (p.key().equals("name"))
+                assertEquals("marko", p.value());
+            else if (p.key().equals("age"))
+                assertEquals(29, p.value());
+            else
+                fail("Should not have any other keys besides 'name' and 'age'");
+        });
     }
 
     @Test