add usage of isEmpty method

This commit is contained in:
Andrei Paikin
2018-05-25 22:47:05 +03:00
parent 20d90bfb0b
commit d00501eabd
6 changed files with 17 additions and 17 deletions

View File

@@ -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());
}
/**