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/01/06 19:42:24 UTC

[19/44] tinkerpop git commit: TINKERPOP-1130 Added more asserts for Element related tests

TINKERPOP-1130 Added more asserts for Element related tests


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

Branch: refs/heads/master
Commit: ef12395486c2753cb452afac563a688a316c5595
Parents: baf1d17
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Thu Dec 29 07:40:25 2016 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Tue Jan 3 10:34:55 2017 -0500

----------------------------------------------------------------------
 .../structure/io/AbstractTypedCompatibilityTest.java | 15 ++++-----------
 1 file changed, 4 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/ef123954/gremlin-tools/gremlin-io-test/src/test/java/org/apache/tinkerpop/gremlin/structure/io/AbstractTypedCompatibilityTest.java
----------------------------------------------------------------------
diff --git a/gremlin-tools/gremlin-io-test/src/test/java/org/apache/tinkerpop/gremlin/structure/io/AbstractTypedCompatibilityTest.java b/gremlin-tools/gremlin-io-test/src/test/java/org/apache/tinkerpop/gremlin/structure/io/AbstractTypedCompatibilityTest.java
index 19114e5..49fd939 100644
--- a/gremlin-tools/gremlin-io-test/src/test/java/org/apache/tinkerpop/gremlin/structure/io/AbstractTypedCompatibilityTest.java
+++ b/gremlin-tools/gremlin-io-test/src/test/java/org/apache/tinkerpop/gremlin/structure/io/AbstractTypedCompatibilityTest.java
@@ -775,7 +775,6 @@ public abstract class AbstractTypedCompatibilityTest extends AbstractCompatibili
         final String resourceName = "stargraph";
         assumeCompatibility(resourceName);
 
-        // todo: more asserts
         final StarGraph resource = findModelEntryObject(resourceName);
         final StarGraph fromStatic = read(getCompatibility().readFromResource(resourceName), StarGraph.class);
         final StarGraph recycled = read(write(fromStatic, StarGraph.class), StarGraph.class);
@@ -783,12 +782,8 @@ public abstract class AbstractTypedCompatibilityTest extends AbstractCompatibili
         assertEquals(fromStatic.getStarVertex(), recycled.getStarVertex());
         assertEquals(resource.getStarVertex(), fromStatic.getStarVertex());
         assertEquals(resource.getStarVertex(), recycled.getStarVertex());
-        assertEquals(fromStatic.getStarVertex().label(), recycled.getStarVertex().label());
-        assertEquals(fromStatic.getStarVertex().id(), recycled.getStarVertex().id());
-        assertEquals(IteratorUtils.count(fromStatic.getStarVertex().properties()), IteratorUtils.count(recycled.getStarVertex().properties()));
-        assertEquals(fromStatic.getStarVertex().property("name").value(), recycled.getStarVertex().property("name").value());
-        assertEquals(fromStatic.getStarVertex().property("name").id(), recycled.getStarVertex().property("name").id());
-        assertEquals(IteratorUtils.count(fromStatic.getStarVertex().edges(Direction.BOTH)), IteratorUtils.count(recycled.getStarVertex().edges(Direction.BOTH)));
+        assertVertex(resource.getStarVertex(), fromStatic.getStarVertex());
+        assertVertex(resource.getStarVertex(), recycled.getStarVertex());
     }
 
     @Test
@@ -865,8 +860,8 @@ public abstract class AbstractTypedCompatibilityTest extends AbstractCompatibili
         assertEquals(resource.bulk(), fromStatic.bulk());
         assertEquals(resource.get(), recycled.get());
         assertEquals(resource.get(), fromStatic.get());
-
-        // todo: more asserts on object itself
+        assertVertex((Vertex) resource.get(), (Vertex) recycled.get());
+        assertVertex((Vertex) resource.get(), (Vertex) fromStatic.get());
     }
 
     @Test
@@ -878,8 +873,6 @@ public abstract class AbstractTypedCompatibilityTest extends AbstractCompatibili
         final Tree fromStatic = read(getCompatibility().readFromResource(resourceName), Tree.class);
         final Tree recycled = read(write(fromStatic, Tree.class), Tree.class);
         assertNotSame(fromStatic, recycled);
-
-        // todo: more asserts on objects in three themselves
     }
 
     @Test