Package com.boundlessgeo.geoserver.json

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


        try (
            FileInputStream in =  new FileInputStream(root.resolve("bundle.json").toFile());
        ) {
            JSONObj obj = JSONWrapper.read(in).toObject();
            assertEquals("blah", obj.str("name"));
        }
    }

    @Test
    public void testZipBundle() throws Exception {
View Full Code Here


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

        JSONObj obj = JSONWrapper.read(result.getResponse().getContentAsString()).toObject();

        assertEquals("one", obj.str("name"));
        assertEquals("foo", obj.str("workspace"));
        assertEquals("vector", obj.str("type"));
        assertEquals("The layer", obj.str("title"));
        assertEquals("This layer is cool!", obj.str("description"));
View Full Code Here

            .andReturn();

        JSONObj obj = JSONWrapper.read(result.getResponse().getContentAsString()).toObject();

        assertEquals("one", obj.str("name"));
        assertEquals("foo", obj.str("workspace"));
        assertEquals("vector", obj.str("type"));
        assertEquals("The layer", obj.str("title"));
        assertEquals("This layer is cool!", obj.str("description"));

        assertEquals("EPSG:4326", obj.object("proj").str("srs"));
View Full Code Here

        JSONObj obj = JSONWrapper.read(result.getResponse().getContentAsString()).toObject();

        assertEquals("one", obj.str("name"));
        assertEquals("foo", obj.str("workspace"));
        assertEquals("vector", obj.str("type"));
        assertEquals("The layer", obj.str("title"));
        assertEquals("This layer is cool!", obj.str("description"));

        assertEquals("EPSG:4326", obj.object("proj").str("srs"));
View Full Code Here

        JSONObj obj = JSONWrapper.read(result.getResponse().getContentAsString()).toObject();

        assertEquals("one", obj.str("name"));
        assertEquals("foo", obj.str("workspace"));
        assertEquals("vector", obj.str("type"));
        assertEquals("The layer", obj.str("title"));
        assertEquals("This layer is cool!", obj.str("description"));

        assertEquals("EPSG:4326", obj.object("proj").str("srs"));

        assertEquals(-180d, obj.object("bbox").object("native").doub("west"), 0.1);
View Full Code Here

        assertEquals("one", obj.str("name"));
        assertEquals("foo", obj.str("workspace"));
        assertEquals("vector", obj.str("type"));
        assertEquals("The layer", obj.str("title"));
        assertEquals("This layer is cool!", obj.str("description"));

        assertEquals("EPSG:4326", obj.object("proj").str("srs"));

        assertEquals(-180d, obj.object("bbox").object("native").doub("west"), 0.1);
        assertEquals(-90d, obj.object("bbox").object("native").doub("south"), 0.1);
View Full Code Here

        JSONArr arr = JSONWrapper.read(result.getResponse().getContentAsString()).toArray();
        assertEquals(2, arr.size());

        JSONObj obj = arr.object(0);
        assertEquals("foo", obj.str("name"));
        assertTrue(obj.bool("default"));
        assertEquals("http://scratch.org", obj.str("uri"));
        assertTrue(obj.has("modified"));
        assertTrue(obj.object("modified").has("timestamp"));
        assertTrue(obj.object("modified").has("pretty"));
View Full Code Here

        assertEquals(2, arr.size());

        JSONObj obj = arr.object(0);
        assertEquals("foo", obj.str("name"));
        assertTrue(obj.bool("default"));
        assertEquals("http://scratch.org", obj.str("uri"));
        assertTrue(obj.has("modified"));
        assertTrue(obj.object("modified").has("timestamp"));
        assertTrue(obj.object("modified").has("pretty"));

        obj = arr.object(1);
View Full Code Here

        assertTrue(obj.has("modified"));
        assertTrue(obj.object("modified").has("timestamp"));
        assertTrue(obj.object("modified").has("pretty"));

        obj = arr.object(1);
        assertEquals("bar", obj.str("name"));
        assertFalse(obj.bool("default"));
        assertEquals("http://bar.org", obj.str("uri"));
        assertTrue(obj.has("modified"));
        assertTrue(obj.object("modified").has("timestamp"));
        assertTrue(obj.object("modified").has("pretty"));
View Full Code Here

        assertTrue(obj.object("modified").has("pretty"));

        obj = arr.object(1);
        assertEquals("bar", obj.str("name"));
        assertFalse(obj.bool("default"));
        assertEquals("http://bar.org", obj.str("uri"));
        assertTrue(obj.has("modified"));
        assertTrue(obj.object("modified").has("timestamp"));
        assertTrue(obj.object("modified").has("pretty"));
    }
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.