@Test public void testModifyLayer() throws Exception { testAddLayer(); LayerInfo l = dao.getLayerByName("anvil"); l.setPath("changed"); dao.save(l); l = dao.getLayerByName("anvil"); assertEquals("changed", l.getPath()); }
@Test public void testAddLayer() throws Exception { testAddFeatureType(); testAddStyle(); NamespaceInfo ns = dao.getNamespaceByPrefix("acme"); FeatureTypeInfo ft = dao.getResourceByName(ns, "anvil", FeatureTypeInfo.class); StyleInfo s = dao.getStyleByName("blue"); LayerInfo l = dao.getCatalog().getFactory().createLayer(); l.setPath("/anvil"); l.setResource(ft); l.setDefaultStyle(s); dao.add(l); assertEquals(l, dao.getLayerByName("anvil")); }