Package com.boundlessgeo.geoserver.json

Examples of com.boundlessgeo.geoserver.json.JSONObj.integer()


        JSONObj obj = JSONWrapper.read(result.getResponse().getContentAsString()).toObject();
        assertEquals("foo", obj.str("name"));
        assertEquals("http://scratch.org", obj.str("uri"));
        assertTrue(obj.bool("default"));

        assertEquals(0, obj.integer("maps").intValue());
        assertEquals(1, obj.integer("layers").intValue());
        assertEquals(0, obj.integer("stores").intValue());

        result = mvc.perform(get("/api/workspaces/bar"))
                .andExpect(status().isOk())
View Full Code Here


        assertEquals("foo", obj.str("name"));
        assertEquals("http://scratch.org", obj.str("uri"));
        assertTrue(obj.bool("default"));

        assertEquals(0, obj.integer("maps").intValue());
        assertEquals(1, obj.integer("layers").intValue());
        assertEquals(0, obj.integer("stores").intValue());

        result = mvc.perform(get("/api/workspaces/bar"))
                .andExpect(status().isOk())
                .andExpect(content().contentType(MediaType.APPLICATION_JSON))
View Full Code Here

        assertEquals("http://scratch.org", obj.str("uri"));
        assertTrue(obj.bool("default"));

        assertEquals(0, obj.integer("maps").intValue());
        assertEquals(1, obj.integer("layers").intValue());
        assertEquals(0, obj.integer("stores").intValue());

        result = mvc.perform(get("/api/workspaces/bar"))
                .andExpect(status().isOk())
                .andExpect(content().contentType(MediaType.APPLICATION_JSON))
                .andReturn();
View Full Code Here

            .andExpect(status().isOk())
            .andExpect(content().contentType(MediaType.APPLICATION_JSON))
            .andReturn();

        JSONObj obj = JSONWrapper.read(result.getResponse().getContentAsString()).toObject();
        assertEquals(2, obj.integer("total").intValue());
        assertEquals(2, obj.integer("count").intValue());
        assertEquals(0, obj.integer("page").intValue());

        JSONArr arr = obj.array("layers");
        assertEquals(arr.size(), 2);
View Full Code Here

            .andExpect(content().contentType(MediaType.APPLICATION_JSON))
            .andReturn();

        JSONObj obj = JSONWrapper.read(result.getResponse().getContentAsString()).toObject();
        assertEquals(2, obj.integer("total").intValue());
        assertEquals(2, obj.integer("count").intValue());
        assertEquals(0, obj.integer("page").intValue());

        JSONArr arr = obj.array("layers");
        assertEquals(arr.size(), 2);
View Full Code Here

            .andReturn();

        JSONObj obj = JSONWrapper.read(result.getResponse().getContentAsString()).toObject();
        assertEquals(2, obj.integer("total").intValue());
        assertEquals(2, obj.integer("count").intValue());
        assertEquals(0, obj.integer("page").intValue());

        JSONArr arr = obj.array("layers");
        assertEquals(arr.size(), 2);

        Iterables.find(arr, new Predicate<Object>() {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.