Permalink
Browse files

Added a test case for clearing of properties by passing null values

  • Loading branch information...
1 parent ecf0333 commit d6c03a197bad7ceac346adc4b7b7b778d9f51f06 @joshsh joshsh committed Jul 12, 2012
@@ -67,6 +67,16 @@ public void testRemoveProperties() {
assertNull(marko.getAge());
}
+ public void testSetPropertiesToNull() {
+ Graph graph = TinkerGraphFactory.createTinkerGraph();
+ FramedGraph<Graph> framedGraph = new FramedGraph<Graph>(graph);
+
+ Person marko = framedGraph.getVertex(1, Person.class);
+ assertEquals(marko.getAge(), new Integer(29));
+ marko.setAge(null);
+ assertNull(marko.getAge());
+ }
+
public void testToString() {
Graph graph = TinkerGraphFactory.createTinkerGraph();
FramedGraph<Graph> framedGraph = new FramedGraph<Graph>(graph);
@@ -16,7 +16,7 @@
public Integer getAge();
@Property("age")
- public void setAge(int age);
+ public void setAge(Integer age);
@Property("age")
public void removeAge();

0 comments on commit d6c03a1

Please sign in to comment.