use of siena.Json in project siena by mandubian.
the class JsonTest method testRemoveAt.
public void testRemoveAt() {
Json json = Json.list(1, 2, 3);
json.removeAt(1);
assertEquals(2, json.size());
assertEquals(1, json.at(0).asInt());
assertEquals(3, json.at(1).asInt());
}
use of siena.Json in project siena by mandubian.
the class JsonTest method testRemoveKey.
public void testRemoveKey() {
Json json = Json.map().put("foo", "bar");
json.remove("foo");
assertTrue(json.isEmpty());
}
use of siena.Json in project siena by mandubian.
the class JsonTest method testAddAll.
public void testAddAll() {
Json json = Json.list(1, 2, 3);
json.addAll(Json.list(4, 5, 6));
assertEquals(6, json.size());
}
Aggregations