@Test public void testContentTypeText() { assertEquals("text/plain", gdalCovRespDelegate.getMimeType("GDAL-XYZ")); assertEquals("txt", gdalCovRespDelegate.getFileExtension("GDAL-XYZ")); }
@Test public void testContentTypePDF() { assertEquals("application/pdf", gdalCovRespDelegate.getMimeType("GDAL-PDF")); assertEquals("pdf", gdalCovRespDelegate.getFileExtension("GDAL-PDF")); }
@Test public void testContentTypeZip() { assertEquals("application/zip", gdalCovRespDelegate.getMimeType("GDAL-ArcInfoGrid")); assertEquals("zip", gdalCovRespDelegate.getFileExtension("GDAL-ArcInfoGrid")); }
@Test public void testContentTypeJP2K() { assertEquals("image/jp2", gdalCovRespDelegate.getMimeType("GDAL-JPEG2000")); assertEquals("jp2", gdalCovRespDelegate.getFileExtension("GDAL-JPEG2000")); }
for (Format of : this.delegate.getFormats()) { ProcessParameterIO ppio = null; String computedMimeType = delegate.getMimeType(of.getGeoserverFormat()); if (of.getGeoserverFormat() != null && !of.getGeoserverFormat().isEmpty()) { computedMimeType = computedMimeType + "; subtype=" + of.getGeoserverFormat();
@Test public void testDescribeProcess() throws Exception { GdalCoverageResponseDelegate delegate = applicationContext.getBean(GdalCoverageResponseDelegate.class); Document d = getAsDOM(root() + "service=wps&request=describeprocess&identifier=gs:CropCoverage"); String base = "/wps:ProcessDescriptions/ProcessDescription/ProcessOutputs"; for (Format f : delegate.getFormats()) { assertXpathExists( base + "/Output[1]/ComplexOutput/Supported/Format[MimeType='" + delegate.getMimeType(f.getGeoserverFormat()) + "; subtype=" + f.getGeoserverFormat() + "']", d); } }