@Test(expected = ServiceException.class) public void testInitRequest_LayerGroupMissing() { this.request.setContext("lg/ows"); this.callback.init(this.request); }
@Test(expected = ServiceException.class) public void testInitRequest_NotAGlobalLayerGroup() { this.request.setContext("cite:LayerGroup2/ows"); this.callback.init(this.request); } }
@Test(expected = ServiceException.class) public void testInitRequest_WithoutWorkspace() { this.request.setContext("ows"); this.callback.init(this.request); }
@Test(expected = ServiceException.class) public void testInitRequest_WorkspaceMissing() { this.request.setContext("ws/ows"); this.callback.init(this.request); }
request.setContext(context); request.setPath(path);
@Test public void testInitRequest_WorkspacedLayerGroupExists() { this.request.setContext("cite/LayerGroup2/ows"); this.callback.init(this.request); assertNotNull(LocalWorkspace.get()); assertNotNull(LocalPublished.get()); }
@Test public void testInitRequest_LayerGroupExists() { this.request.setContext("LayerGroup1/ows"); this.callback.init(this.request); assertNull(LocalWorkspace.get()); assertNotNull(LocalPublished.get()); }
@Test public void testInitRequest_LayerExists() { this.request.setContext("cite/BasicPolygons/ows"); this.callback.init(this.request); assertNotNull(LocalWorkspace.get()); assertNotNull(LocalPublished.get()); }
@Test public void testInitRequest_LayerMissing() { this.request.setContext("cite/MissingLayer/ows"); this.callback.init(this.request); assertNotNull(LocalWorkspace.get()); assertNull(LocalPublished.get()); }
@Test public void testInitRequest_WorkspacedLayerGroupMissing() { this.request.setContext("cite/lg/ows"); this.callback.init(this.request); assertNotNull(LocalWorkspace.get()); assertNull(LocalPublished.get()); }
@Test public void testInitRequest_WorkspaceExists() { this.request.setContext("cite/ows"); this.callback.init(this.request); assertNotNull(LocalWorkspace.get()); assertNull(LocalPublished.get()); }
@Test public void testInitRequest_LayerMissingInWorkspace() { this.request.setContext("cite/Fifteen/ows"); this.callback.init(this.request); assertNotNull(LocalWorkspace.get()); assertNull(LocalPublished.get()); }
req.setContext(null);
@Test public void testLayerSpecificCapabilities() throws Exception { AdvertisedCatalog sc = new AdvertisedCatalog(catalog); Dispatcher.REQUEST.get().setContext("topp/states"); assertNotNull(sc.getLayerByName("topp:states")); } }