예제 #1
0
  @Override
  protected void onSetUp(SystemTestData testData) throws Exception {
    super.onSetUp(testData);

    testData.addStyle("relative", "se_relativepath.sld", ResourcePoolTest.class, getCatalog());
    StyleInfo style = getCatalog().getStyleByName("relative");
    style.setSLDVersion(new Version("1.1.0"));
    getCatalog().save(style);
    File images = new File(testData.getDataDirectoryRoot(), "styles/images");
    assertTrue(images.mkdir());
    File image = new File("./src/test/resources/org/geoserver/catalog/rockFillSymbol.png");
    assertTrue(image.exists());
    FileUtils.copyFileToDirectory(image, images);
    rockFillSymbolFile = new File(images, image.getName()).getCanonicalFile();

    testData.addRasterLayer(
        TIMERANGES, "timeranges.zip", null, null, SystemTestData.class, getCatalog());
  }
예제 #2
0
 @Override
 protected void onSetUp(SystemTestData testData) throws Exception {
   super.onSetUp(testData);
   Catalog catalog = getCatalog();
   testData.addStyle("Bridge", "bridge.sld", getClass(), catalog);
   testData.addStyle("allsymbolizers", "allsymbolizers.sld", getClass(), catalog);
   testData.addStyle("labels", "labels.sld", getClass(), catalog);
   testData.addStyle("SingleFeature", "singlefeature.sld", getClass(), catalog);
   testData.addStyle("BridgeSubdir", "bridgesubdir.sld", getClass(), catalog);
   testData.addStyle("dynamicsymbolizer", "dynamicsymbolizer.sld", getClass(), catalog);
   testData.addStyle("relativeds", "relativeds.sld", getClass(), catalog);
   testData.addStyle("big-local-image", "big-local-image.sld", getClass(), catalog);
   testData.addStyle("big-mark", "big-mark.sld", getClass(), catalog);
   testData.copyTo(getClass().getResourceAsStream("bridge.png"), "styles/bridge.png");
   testData.copyTo(getClass().getResourceAsStream("planet-42.png"), "styles/planet-42.png");
   File stylesDir = new File(testData.getDataDirectoryRoot(), "styles");
   new File(stylesDir, "graphics").mkdir();
   testData.copyTo(
       getClass().getResourceAsStream("bridge.png"), "styles/graphics/bridgesubdir.png");
 }