sapienza88 commented on code in PR #773:
URL: https://github.com/apache/incubator-graphar/pull/773#discussion_r2616543678


##########
maven-projects/info/src/test/java/org/apache/graphar/info/GraphInfoTest.java:
##########
@@ -109,6 +109,19 @@ public void testGraphInfoBasics() {
                 illegalArgumentException.getMessage());
         // test version gar/v1
         Assert.assertEquals(1, graphInfo.getVersion().getVersion());
+        // basic tests for addVertex and removeVertex (more advanced ones 
should include adjancency
+        // list checks)
+        VertexInfo testingVertexInfo =
+                new VertexInfo("", 100, Arrays.asList(TestUtil.pg1), 
"vertex/person/", "gar/v1");
+        GraphInfo testingGraphInfo =
+                new GraphInfo("graphTest", new ArrayList<>(), new 
ArrayList<>(), "", "");
+        // add the created vertex on an empty graph
+        Assert.assertEquals(
+                1,
+                
testingGraphInfo.addVertexAsNew(testingVertexInfo).get().getVertexInfos().size());
+        // remove the newly created vertex and check again the emptied graph
+        Assert.assertEquals(true, 
testingGraphInfo.removeVertex(testingVertexInfo).isEmpty());
+        // TODO (same tests as vertices for edges)

Review Comment:
   done



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to