use of com.hazelcast.internal.json.JsonArray in project hazelcast by hazelcast.
the class Json_Test method array_int.
@Test
public void array_int() {
assertEquals(new JsonArray().add(23), Json.array(new int[] { 23 }));
assertEquals(new JsonArray().add(23).add(42), Json.array(new int[] { 23, 42 }));
}
use of com.hazelcast.internal.json.JsonArray in project hazelcast by hazelcast.
the class Json_Test method array_boolean.
@Test
public void array_boolean() {
assertEquals(new JsonArray().add(true), Json.array(true));
assertEquals(new JsonArray().add(true).add(false), Json.array(true, false));
}
use of com.hazelcast.internal.json.JsonArray in project hazelcast by hazelcast.
the class PrettyPrint_Test method testIndentWithSpaces_emptyArray.
@Test
public void testIndentWithSpaces_emptyArray() throws IOException {
new JsonArray().writeTo(output, indentWithSpaces(2));
assertEquals("[\n \n]", output.toString());
}
use of com.hazelcast.internal.json.JsonArray in project hazelcast by hazelcast.
the class PrettyPrint_Test method testIndentWithSpaces_array.
@Test
public void testIndentWithSpaces_array() throws IOException {
new JsonArray().add(23).add(42).writeTo(output, indentWithSpaces(2));
assertEquals("[\n 23,\n 42\n]", output.toString());
}
use of com.hazelcast.internal.json.JsonArray in project hazelcast by hazelcast.
the class PrettyPrint_Test method testIndentWithSpaces_zero.
@Test
public void testIndentWithSpaces_zero() throws IOException {
new JsonArray().add(23).add(42).writeTo(output, indentWithSpaces(0));
assertEquals("[\n23,\n42\n]", output.toString());
}
Aggregations