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

@@ -35,7 +35,7 @@ public class EnumTest {
// If there are no getters then the object is empty.
MyEnum myEnum = MyEnum.VAL2;
JSONObject jsonObject = new JSONObject(myEnum);
assertTrue("simple enum has no getters", jsonObject.length() == 0);
assertTrue("simple enum has no getters", jsonObject.isEmpty());
// enum with a getters should create a non-empty object
MyEnumField myEnumField = MyEnumField.VAL2;