From 8f71e01ae3cb64c8d9db11e45cc13dc101c861f0 Mon Sep 17 00:00:00 2001 From: stleary Date: Sun, 9 Aug 2015 18:30:16 -0500 Subject: [PATCH] Add method comments so JavaDoc will pick them up. --- PropertyTest.java | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/PropertyTest.java b/PropertyTest.java index 4354488..60d3eb5 100644 --- a/PropertyTest.java +++ b/PropertyTest.java @@ -9,26 +9,35 @@ import org.junit.Test; /** - * Tests for JSON-Java Property.java + * Tests for JSON-Java Property */ public class PropertyTest { + /** + * JSONObject from null properties object should + * result in an empty JSONObject. + */ @Test public void shouldHandleNullProperties() { - Properties properties = null; JSONObject jsonObject = Property.toJSONObject(properties); assertTrue("jsonObject should be empty", jsonObject.length() == 0); } + /** + * JSONObject from empty properties object should + * result in an empty JSONObject. + */ @Test public void shouldHandleEmptyProperties() { - Properties properties = new Properties(); JSONObject jsonObject = Property.toJSONObject(properties); assertTrue("jsonObject should be empty", jsonObject.length() == 0); } + /** + * JSONObject from simple properties object. + */ @Test public void shouldHandleProperties() { Properties properties = new Properties(); @@ -54,6 +63,10 @@ public class PropertyTest { "Indianapolis".equals(jsonObject.get("Indiana"))); } + /** + * Null JSONObject toProperties() should result in an empty + * Properties object. + */ @Test public void shouldHandleNullJSONProperty() { JSONObject jsonObject= null; @@ -62,6 +75,10 @@ public class PropertyTest { properties.size() == 0); } + /** + * Properties should convert to JSONObject, and back to + * Properties without changing. + */ @Test public void shouldHandleJSONProperty() { Properties properties = new Properties();