mirror of
https://github.com/fankes/JSON-java-compat.git
synced 2025-09-09 03:54:36 +08:00
add usage of isEmpty method
This commit is contained in:
@@ -21,7 +21,7 @@ public class PropertyTest {
|
||||
public void shouldHandleNullProperties() {
|
||||
Properties properties = null;
|
||||
JSONObject jsonObject = Property.toJSONObject(properties);
|
||||
assertTrue("jsonObject should be empty", jsonObject.length() == 0);
|
||||
assertTrue("jsonObject should be empty", jsonObject.isEmpty());
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -32,7 +32,7 @@ public class PropertyTest {
|
||||
public void shouldHandleEmptyProperties() {
|
||||
Properties properties = new Properties();
|
||||
JSONObject jsonObject = Property.toJSONObject(properties);
|
||||
assertTrue("jsonObject should be empty", jsonObject.length() == 0);
|
||||
assertTrue("jsonObject should be empty", jsonObject.isEmpty());
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user