Package com.streamreduce.util

Examples of com.streamreduce.util.JSONObjectBuilder


    }

    @Test
    public void testConfigKeyPOST_arrayWithNullAsString() {
        //Tests SOBA-2079 when passing in [null] as a key value in a JSONObject
        JSONObject newConfigValues = new JSONObjectBuilder()
                .add("foo", "[null]")
                .build();
        Response responsePOST = userResource.setConfigValues(newConfigValues);
        assertEquals(Response.Status.OK.getStatusCode(), responsePOST.getStatus());
        JSONObject responseBody = (JSONObject) responsePOST.getEntity();
View Full Code Here


    }

    @Test
    public void testConfigKeyPOST_NullsInObjectsAndDeeplyNestedNullsInArrays() {
        //Tests SOBA-2079 when passing in [null] as a key value in a JSONObject
        JSONObject newConfigValues = new JSONObjectBuilder()
                .add("foo", new JSONObjectBuilder()
                        .add("bar", JSONNull.getInstance())
                        .add("baz", 1)
                        .array("bing", 1, 2, 3, JSONNull.getInstance())
                        .build())
                .array("arr", 1, 2, 3, JSONNull.getInstance()).build();
View Full Code Here

    }

    @Test
    public void testSendRawMessage() throws Exception {
        //Send a JSONObject to sendRawMessage... just verify that raw was created.
        JSONObject rawMessage = new JSONObjectBuilder().add("foo", "bar").build();
        outboundClient.putRawMessage(rawMessage);
        assertTrue(webHDFSClient.exists("raw"));
    }
View Full Code Here

TOP

Related Classes of com.streamreduce.util.JSONObjectBuilder

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.