Skip to content

Commit 8f71e01

Browse files
committed
Add method comments so JavaDoc will pick them up.
1 parent ccbec81 commit 8f71e01

File tree

1 file changed

+20
-3
lines changed

1 file changed

+20
-3
lines changed

PropertyTest.java

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,26 +9,35 @@
99

1010

1111
/**
12-
* Tests for JSON-Java Property.java
12+
* Tests for JSON-Java Property
1313
*/
1414
public class PropertyTest {
1515

16+
/**
17+
* JSONObject from null properties object should
18+
* result in an empty JSONObject.
19+
*/
1620
@Test
1721
public void shouldHandleNullProperties() {
18-
1922
Properties properties = null;
2023
JSONObject jsonObject = Property.toJSONObject(properties);
2124
assertTrue("jsonObject should be empty", jsonObject.length() == 0);
2225
}
2326

27+
/**
28+
* JSONObject from empty properties object should
29+
* result in an empty JSONObject.
30+
*/
2431
@Test
2532
public void shouldHandleEmptyProperties() {
26-
2733
Properties properties = new Properties();
2834
JSONObject jsonObject = Property.toJSONObject(properties);
2935
assertTrue("jsonObject should be empty", jsonObject.length() == 0);
3036
}
3137

38+
/**
39+
* JSONObject from simple properties object.
40+
*/
3241
@Test
3342
public void shouldHandleProperties() {
3443
Properties properties = new Properties();
@@ -54,6 +63,10 @@ public void shouldHandleProperties() {
5463
"Indianapolis".equals(jsonObject.get("Indiana")));
5564
}
5665

66+
/**
67+
* Null JSONObject toProperties() should result in an empty
68+
* Properties object.
69+
*/
5770
@Test
5871
public void shouldHandleNullJSONProperty() {
5972
JSONObject jsonObject= null;
@@ -62,6 +75,10 @@ public void shouldHandleNullJSONProperty() {
6275
properties.size() == 0);
6376
}
6477

78+
/**
79+
* Properties should convert to JSONObject, and back to
80+
* Properties without changing.
81+
*/
6582
@Test
6683
public void shouldHandleJSONProperty() {
6784
Properties properties = new Properties();

0 commit comments

Comments
 (0)