WorldImage file tif to UnitTest
This commit is contained in:
parent
c0e4170f5c
commit
f22ded59a2
@ -29,6 +29,7 @@ import static org.junit.Assert.assertTrue;
|
|||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
import java.net.URI;
|
||||||
|
|
||||||
import org.apache.commons.httpclient.NameValuePair;
|
import org.apache.commons.httpclient.NameValuePair;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
@ -53,9 +54,9 @@ public class GeoserverRESTWorldImageTest extends GeoserverRESTTest {
|
|||||||
@Test
|
@Test
|
||||||
public void testPublishWorldImage() throws IOException {
|
public void testPublishWorldImage() throws IOException {
|
||||||
|
|
||||||
if (!enabled()) {
|
// if (!enabled()) {
|
||||||
return;
|
// return;
|
||||||
}
|
// }
|
||||||
deleteAll();
|
deleteAll();
|
||||||
String storeName = "testWorldimage";
|
String storeName = "testWorldimage";
|
||||||
|
|
||||||
@ -66,6 +67,9 @@ public class GeoserverRESTWorldImageTest extends GeoserverRESTTest {
|
|||||||
File worldImageFile = new ClassPathResource(
|
File worldImageFile = new ClassPathResource(
|
||||||
"testdata/sw.zip").getFile();
|
"testdata/sw.zip").getFile();
|
||||||
|
|
||||||
|
File worldImageFileTif = new ClassPathResource(
|
||||||
|
"testdata/sw.tif").getFile();
|
||||||
|
|
||||||
// test publish
|
// test publish
|
||||||
|
|
||||||
boolean wp = publisher.publishWorldImage(DEFAULT_WS, storeName,
|
boolean wp = publisher.publishWorldImage(DEFAULT_WS, storeName,
|
||||||
@ -93,15 +97,13 @@ public class GeoserverRESTWorldImageTest extends GeoserverRESTTest {
|
|||||||
|
|
||||||
assertTrue("Unpublish() failed", publisher.removeCoverageStore(DEFAULT_WS, storeName, true));
|
assertTrue("Unpublish() failed", publisher.removeCoverageStore(DEFAULT_WS, storeName, true));
|
||||||
|
|
||||||
// --
|
wp = publisher.publishWorldImage(DEFAULT_WS, storeName, worldImageFileTif.toURI(), ParameterConfigure.FIRST, new NameValuePair("coverageName", "worldImage_test"));
|
||||||
|
|
||||||
wp = publisher.publishWorldImage(DEFAULT_WS, storeName, worldImageFile.toURI(), ParameterConfigure.FIRST, new NameValuePair("coverageName", "worldImage_test"));
|
|
||||||
|
|
||||||
assertTrue("Publish worldfile configuring all available layers, failed.", wp);
|
assertTrue("Publish worldfile configuring all available layers, failed.", wp);
|
||||||
|
|
||||||
assertTrue("Unpublish() failed", publisher.removeCoverageStore(DEFAULT_WS, storeName, true));
|
assertTrue("Unpublish() failed", publisher.removeCoverageStore(DEFAULT_WS, storeName, true));
|
||||||
|
|
||||||
wp = publisher.publishWorldImage(DEFAULT_WS, storeName, worldImageFile.toURI());
|
wp = publisher.publishWorldImage(DEFAULT_WS, storeName, worldImageFileTif.toURI());
|
||||||
|
|
||||||
assertTrue("Publish worldfile configuring all available layers, failed.", wp);
|
assertTrue("Publish worldfile configuring all available layers, failed.", wp);
|
||||||
|
|
||||||
|
|||||||
6
src/test/resources/testdata/sw.tfw
vendored
Normal file
6
src/test/resources/testdata/sw.tfw
vendored
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
0.9000000000
|
||||||
|
0.0000000000
|
||||||
|
0.0000000000
|
||||||
|
-0.9000000000
|
||||||
|
-179.5500000000
|
||||||
|
89.5500000000
|
||||||
BIN
src/test/resources/testdata/sw.tif
vendored
Normal file
BIN
src/test/resources/testdata/sw.tif
vendored
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user