1
0
Fork 0
mirror of https://github.com/ethauvin/JSON-java.git synced 2025-06-17 07:50:52 -07:00

95.9% coverage

This commit is contained in:
stleary 2015-04-14 01:12:08 -05:00
parent e5c01e4ff8
commit d75a96ae59

View file

@ -450,6 +450,18 @@ public class JSONArrayTest {
JSONArray jsonArray = new JSONArray();
assertTrue("toJSONObject should return null",
null == jsonArray.toJSONObject(names));
}
@Test
public void objectArrayVsIsArray() {
String expectedStr =
"["+
"1,2,3,4,5,6,7"+
"]";
int[] myInts = { 1, 2, 3, 4, 5, 6, 7 };
Object myObject = myInts;
JSONArray jsonArray = new JSONArray(myObject);
JSONArray expectedJsonArray = new JSONArray(expectedStr);
Util.compareActualVsExpectedJsonArrays(jsonArray, expectedJsonArray);
}
}