/** @return The global wcs instance from the application context. */ protected WCSInfo getWCS() { WCSInfo wcs = getGeoServer().getService(WCSInfo.class); return wcs; }
/** @return The global wfs instance from the application context. */ protected WCSInfo getWCS() { return getGeoServer().getService(WCSInfo.class); }
/** * Parses a multipart message from the response * * @param response * @throws MessagingException * @throws IOException */ protected Multipart getMultipart(MockHttpServletResponse response) throws MessagingException, IOException { MimeMessage body = new MimeMessage((Session) null, getBinaryInputStream(response)); Multipart multipart = (Multipart) body.getContent(); return multipart; } }
@Override protected void onSetUp(SystemTestData testData) throws Exception { super.onSetUp(testData); // init xmlunit Map<String, String> namespaces = new HashMap<String, String>(); namespaces.put("wcs", "http://www.opengis.net/wcs"); namespaces.put("ows", "http://www.opengis.net/ows/1.1"); namespaces.put("gml", "http://www.opengis.net/gml"); namespaces.put("xlink", "http://www.w3.org/1999/xlink"); XMLUnit.setXpathNamespaceContext(new SimpleNamespaceContext(namespaces)); xpath = XMLUnit.newXpathEngine(); }
@Override protected void onSetUp(SystemTestData testData) throws Exception { super.onSetUp(testData); Catalog catalog = (Catalog) applicationContext.getBean("catalog"); reader = new GetCoverageRequestReader(catalog); }
protected void checkOws11Exception(Document dom) throws Exception { assertEquals("ServiceExceptionReport", dom.getFirstChild().getNodeName()); assertEquals("1.2.0", dom.getFirstChild().getAttributes().getNamedItem("version") .getNodeValue()); assertXpathEvaluatesTo("1.2.0", "/ServiceExceptionReport/@version", dom); Node root = xpath.getMatchingNodes("/ServiceExceptionReport", dom).item(0); assertNotNull(root); }
@Override protected void oneTimeSetUp() throws Exception { super.oneTimeSetUp(); Catalog catalog = (Catalog) applicationContext.getBean("catalog"); reader = new Wcs10GetCoverageRequestReader(catalog); }
@Override protected void populateDataDirectory(MockData dataDirectory) throws Exception { super.populateDataDirectory(dataDirectory); // add a raster mosaic with time and elevation dataDirectory.addCoverage(WATTEMP, TestData.class.getResource("watertemp.zip"), null, "raster"); }
@Override protected void populateDataDirectory(MockData dataDirectory) throws Exception { super.populateDataDirectory(dataDirectory); // this also adds the raster style dataDirectory.addCoverage(MOSAIC, MockData.class.getResource("raster-filter-test.zip"), null, "raster"); }
@Override protected void setUpTestData(SystemTestData testData) throws Exception { super.setUpTestData(testData); // add a raster mosaic with time and elevation testData.setUpRasterLayer(WATTEMP, "watertemp.zip", null, null, TestData.class); // a raster layer with time, elevation and custom dimensions as ranges testData.setUpRasterLayer(TIMERANGES, "timeranges.zip", null, null, TestData.class); }
@Override protected void oneTimeSetUp() throws Exception { super.oneTimeSetUp(); // init xmlunit Map<String, String> namespaces = new HashMap<String, String>(); namespaces.put("wcs", "http://www.opengis.net/wcs"); namespaces.put("ows", "http://www.opengis.net/ows/1.1"); namespaces.put("gml", "http://www.opengis.net/gml"); namespaces.put("xlink", "http://www.w3.org/1999/xlink"); XMLUnit.setXpathNamespaceContext(new SimpleNamespaceContext(namespaces)); xpath = XMLUnit.newXpathEngine(); }
@Override protected void setUpInternal() throws Exception { super.setUpInternal(); kvpreader = (Wcs10GetCoverageRequestReader) applicationContext.getBean("wcs100GetCoverageRequestReader"); service = (WebCoverageService100) applicationContext.getBean("wcs100ServiceTarget"); configuration = new WCSConfiguration(); catalog=(Catalog)applicationContext.getBean("catalog"); xmlReader = new WcsXmlReader("GetCoverage", "1.0.0", configuration); // enable dimensions on the water temperature layer setupRasterDimension(ResourceInfo.TIME, DimensionPresentation.LIST, null); setupRasterDimension(ResourceInfo.ELEVATION, DimensionPresentation.LIST, null); }
/** * @return The global wcs instance from the application context. */ protected WCSInfo getWCS() { WCSInfo wcs = getGeoServer().getService(WCSInfo.class); return wcs; }
@Override protected void onSetUp(SystemTestData testData) throws Exception { super.onSetUp(testData); // init xmlunit Map<String, String> namespaces = new HashMap<String, String>(); namespaces.put("wcs", "http://www.opengis.net/wcs/1.1.1"); namespaces.put("ows", "http://www.opengis.net/ows/1.1"); namespaces.put("xlink", "http://www.w3.org/1999/xlink"); namespaces.put("xsi", "http://www.w3.org/2001/XMLSchema-instance"); XMLUnit.setXpathNamespaceContext(new SimpleNamespaceContext(namespaces)); xpath = XMLUnit.newXpathEngine(); }
@Override protected void onSetUp(SystemTestData testData) throws Exception { super.onSetUp(testData); GeoServerInfo global = getGeoServer().getGlobal(); global.getSettings().setProxyBaseUrl("src/test/resources/geoserver"); getGeoServer().save(global); }
@Override protected void oneTimeSetUp() throws Exception { super.oneTimeSetUp(); configuration = new WCSConfiguration(); reader = new WcsXmlReader("GetCoverage", "1.0.0", configuration); }
/** @return The global wfs instance from the application context. */ protected WCSInfo getWCS() { return getGeoServer().getService(WCSInfo.class); }
@Override protected void onSetUp(SystemTestData testData) throws Exception { super.onSetUp(testData); testData.addRasterLayer( CUST_WATTEMP, "custwatertemp.zip", null, null, SystemTestData.class, getCatalog()); setupRasterDimension(DIMENSION_NAME, DimensionPresentation.LIST); }
@Override protected void onSetUp(SystemTestData testData) throws Exception { super.onSetUp(testData); testData.addRasterLayer(MOSAIC, "raster-filter-test.zip", null, getCatalog()); testData.addRasterLayer( SPATIO_TEMPORAL, "spatio-temporal.zip", null, null, SystemTestData.class, getCatalog()); testData.addRasterLayer( new QName(MockData.WCS_URI, "category", MockData.WCS_PREFIX), "category.tiff", null, getCatalog()); // enable dimensions on the water temperature layer setupRasterDimension(WATTEMP, ResourceInfo.TIME, DimensionPresentation.LIST, null); setupRasterDimension(WATTEMP, ResourceInfo.ELEVATION, DimensionPresentation.LIST, null); }
@Override protected void onSetUp(SystemTestData testData) throws Exception { super.onSetUp(testData); testData.addRasterLayer( WATTEMP, "watertempDynamicDims.zip", null, null, SystemTestData.class, getCatalog()); setupRasterDimension(DIMENSION_NAME, DimensionPresentation.LIST); }