예제 #1
0
  @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());
  }
예제 #2
0
  @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"));
  }