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:
parent
e5c01e4ff8
commit
d75a96ae59
1 changed files with 13 additions and 1 deletions
|
@ -450,6 +450,18 @@ public class JSONArrayTest {
|
||||||
JSONArray jsonArray = new JSONArray();
|
JSONArray jsonArray = new JSONArray();
|
||||||
assertTrue("toJSONObject should return null",
|
assertTrue("toJSONObject should return null",
|
||||||
null == jsonArray.toJSONObject(names));
|
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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue