@Before public void initCallback() { this.callback = new LocalWorkspaceCallback(getGeoServer()); this.request = new Request(); }
@After public void removeThreadLocals() { this.callback.finished(this.request); }
@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); }
@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_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_LayerGroupExists() { this.request.setContext("LayerGroup1/ows"); this.callback.init(this.request); assertNull(LocalWorkspace.get()); assertNotNull(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()); }