APISonar


org.geoserver.test.GeoServerBaseTestSupport.LOGGER.log

> org > geoserver > test > GeoServerBaseTestSupport > LOGGER > log
org APIs geoserver APIs test APIs GeoServerBaseTestSupport APIs LOGGER APIs log APIs

Example 1
public void testApiYaml() throws Exception {
        String yaml = getAsString("ogc/features/api?f=application/x-yaml");
        GeoServerBaseTestSupport.LOGGER.log(Level.INFO, yaml);

        ObjectMapper mapper = Yaml.mapper();
        OpenAPI api = mapper.readValue(yaml, OpenAPI.class);
        validateApi(api);
    }
Example 2
public void testApiJson() throws Exception {
        MockHttpServletResponse response = getAsMockHttpServletResponse("ogc/features/api", 200);
        assertThat(
                response.getContentType(),
                CoreMatchers.startsWith("application/openapi+json;version=3.0"));
        String json = response.getContentAsString();
        GeoServerBaseTestSupport.LOGGER.log(Level.INFO, json);

        ObjectMapper mapper = Json.mapper();
        OpenAPI api = mapper.readValue(json, OpenAPI.class);
        validateApi(api);
    }