Package org.springframework.mock.web

Examples of org.springframework.mock.web.MockHttpServletResponse.flushBuffer()


    Assert.assertEquals((short) 123, feature.getAttributes().get("shortAttr").getValue());
    Assert.assertEquals("http://www.geomajas.org/url1",
        fixSlash(feature.getAttributes().get("urlAttr").getValue().toString()));

    view.render(mav.getModel(), request, response);
    response.flushBuffer();
    Object json = new JSONParser().parse(response.getContentAsString());
    String isodate = GeoJSONUtil.DATE_FORMAT.format(c.getTime());
    Assert.assertTrue(json instanceof JSONObject);
    Assert.assertEquals("{\"type\":\"Feature\"," + "\"geometry\":{\"type\":\"MultiPolygon\","
        + "\"coordinates\":[[[[0.0,0.0],[1,0.0],[1,1],[0.0,1],[0.0,0.0]]]]}," + "\"properties\":{"
View Full Code Here


    request.setParameter("queryable", "stringAttr");
    request.setParameter("stringAttr_eq", "bean1");
    request.setParameter("epsg", "900913");
    ModelAndView mav = adapter.handle(request, response, restController);
    view.render(mav.getModel(), request, response);
    response.flushBuffer();
    Object json = new JSONParser().parse(response.getContentAsString());
    Assert.assertTrue(json instanceof JSONObject);
    JSONObject jsonObject = (JSONObject) json;
    JSONArray features = (JSONArray) jsonObject.get("features");
    JSONObject feature = (JSONObject) features.get(0);
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.