Package org.geowebcache

Examples of org.geowebcache.GeoWebCacheDispatcher


   

    @Test
    public void testPreserveHeaders() throws Exception {
        // the code defaults to localhost:8080/geoserver, but the tests work otherwise
        GeoWebCacheDispatcher dispatcher = GeoServerExtensions.bean(GeoWebCacheDispatcher.class);
        // dispatcher.setServletPrefix("http://localhost/geoserver/");
        MockHttpServletResponse response = getAsServletResponse("gwc/service/wms?service=wms&version=1.1.0&request=GetCapabilities");
        System.out.println(response.getOutputStreamContent());
        assertEquals("application/vnd.ogc.wms_xml", response.getContentType());
        assertEquals("inline;filename=wms-getcapabilities.xml", response.getHeader("content-disposition"));
View Full Code Here


    }

    private void testMultipleCrsMatchingGridSubsets(final String srs, final String expectedGridset,
            long[] tileIndex) throws Exception {

        GeoWebCacheDispatcher gwcd = mock(GeoWebCacheDispatcher.class);
        when(gwcd.getServletPrefix()).thenReturn(null);
       
        service = new WMSService(sb, tld, mock(RuntimeStats.class), new NullURLMangler(), gwcd);

        @SuppressWarnings("unchecked")
        Map<String, String> kvp = new CaseInsensitiveMap();
View Full Code Here

        return tileLayer;
    }

    public void testGetCap() throws Exception {
   
        GeoWebCacheDispatcher gwcd = mock(GeoWebCacheDispatcher.class);
        when(gwcd.getServletPrefix()).thenReturn(null);
       
        service = new WMSService(sb, tld, mock(RuntimeStats.class), new NullURLMangler(), gwcd);
   
        @SuppressWarnings("unchecked")
        Map<String, String> kvp = new CaseInsensitiveMap();
View Full Code Here

   
    }

    public void testGetConveyorWithParameters() throws Exception {

        GeoWebCacheDispatcher gwcd = mock(GeoWebCacheDispatcher.class);
        when(gwcd.getServletPrefix()).thenReturn(null);

        service = new WMSService(sb, tld, mock(RuntimeStats.class), new NullURLMangler(), gwcd);

        String layerName = "mockLayer";
        String timeValue = "00:00";
View Full Code Here

        return tileLayer;
    }

    public void testGetCap() throws Exception {
   
        GeoWebCacheDispatcher gwcd = mock(GeoWebCacheDispatcher.class);
        when(gwcd.getServletPrefix()).thenReturn(null);
       
        service = new WMTSService(sb, tld,null , mock(RuntimeStats.class));
   
        @SuppressWarnings("unchecked")
        Map<String, String> kvp = new CaseInsensitiveMap();
View Full Code Here

        assertEquals("", xpath.evaluate("//wmts:Contents/wmts:Layer/wmts:Style/ows:Identifier", doc));
    }
   
    public void testGetCapUnboundedStyleFilter() throws Exception {
       
        GeoWebCacheDispatcher gwcd = mock(GeoWebCacheDispatcher.class);
        when(gwcd.getServletPrefix()).thenReturn(null);
       
        service = new WMTSService(sb, tld,null , mock(RuntimeStats.class));
   
        @SuppressWarnings("unchecked")
        Map<String, String> kvp = new CaseInsensitiveMap();
View Full Code Here

        assertEquals("1", xpath.evaluate("count(//wmts:Contents/wmts:Layer/wmts:Style/ows:Identifier)", doc));
        assertEquals("", xpath.evaluate("//wmts:Contents/wmts:Layer/wmts:Style/ows:Identifier", doc));
    }
    public void testGetCapEmptyStyleFilter() throws Exception {
       
        GeoWebCacheDispatcher gwcd = mock(GeoWebCacheDispatcher.class);
        when(gwcd.getServletPrefix()).thenReturn(null);
       
        service = new WMTSService(sb, tld,null , mock(RuntimeStats.class));
   
        @SuppressWarnings("unchecked")
        Map<String, String> kvp = new CaseInsensitiveMap();
View Full Code Here

        assertEquals("", xpath.evaluate("//wmts:Contents/wmts:Layer/wmts:Style/ows:Identifier", doc));
    }
   
    public void testGetCapMultipleStyles() throws Exception {
       
        GeoWebCacheDispatcher gwcd = mock(GeoWebCacheDispatcher.class);
        when(gwcd.getServletPrefix()).thenReturn(null);
       
        service = new WMTSService(sb, tld,null , mock(RuntimeStats.class));
   
        @SuppressWarnings("unchecked")
        Map<String, String> kvp = new CaseInsensitiveMap();
View Full Code Here

    }
   
    @SuppressWarnings("unchecked")
    public void testGetTileWithStyle() throws Exception {
       
        GeoWebCacheDispatcher gwcd = mock(GeoWebCacheDispatcher.class);
        when(gwcd.getServletPrefix()).thenReturn(null);
       
        service = new WMTSService(sb, tld,null , mock(RuntimeStats.class));
   
        Map<String, String> kvp = new CaseInsensitiveMap();
        kvp.put("service", "WMTS");
View Full Code Here

TOP

Related Classes of org.geowebcache.GeoWebCacheDispatcher

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.