[Schmitzm-commits] r1598 - branches/2.5/schmitzm-gt/src/test/java/de/schmitzm/geotools/io
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Sun May 29 21:48:42 CEST 2011
Author: alfonx
Date: 2011-05-29 21:48:41 +0200 (Sun, 29 May 2011)
New Revision: 1598
Modified:
branches/2.5/schmitzm-gt/src/test/java/de/schmitzm/geotools/io/GeoImportUtilTest.java
Log:
Modified: branches/2.5/schmitzm-gt/src/test/java/de/schmitzm/geotools/io/GeoImportUtilTest.java
===================================================================
--- branches/2.5/schmitzm-gt/src/test/java/de/schmitzm/geotools/io/GeoImportUtilTest.java 2011-05-29 16:59:15 UTC (rev 1597)
+++ branches/2.5/schmitzm-gt/src/test/java/de/schmitzm/geotools/io/GeoImportUtilTest.java 2011-05-29 19:48:41 UTC (rev 1598)
@@ -3,10 +3,13 @@
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
+import java.io.File;
import java.io.IOException;
import java.util.Iterator;
import java.util.NoSuchElementException;
+import org.apache.commons.io.FileUtils;
+import org.apache.commons.io.IOUtils;
import org.geotools.data.DataStore;
import org.geotools.data.FeatureSource;
import org.geotools.data.shapefile.indexed.IndexedShapefileDataStore;
@@ -16,6 +19,7 @@
import org.opengis.feature.simple.SimpleFeatureType;
import de.schmitzm.geotools.testing.GTTestingUtil;
+import de.schmitzm.io.IOUtil;
import de.schmitzm.testing.TestingClass;
public class GeoImportUtilTest extends TestingClass {
@@ -57,9 +61,32 @@
// assertFalse(GeoImportUtil.isOldBrokenQix(idxShpDs));
}
+
+
+ private File preparePrjFile() throws IOException {
+
+ final File d = new File(IOUtil.getTempDir(), "a");
+ d.mkdirs();
+ final File f = new File(d, "a.prj");
+ f.createNewFile();
+ assertTrue(f.exists());
+ return f;
+
+ }
+
@Test
- public void testCreateGridReaderFromGeoTiff()
+ public void testReadProjectionFile1() throws IOException
+ {
+ File f = preparePrjFile();
+ GeoImportUtil.readProjectionFile(f);
+ FileUtils.deleteDirectory(f.getParentFile());
+ }
+
+ @Test
+ public void testReadProjectionFile2() throws IOException
{
-
+ File f = preparePrjFile();
+ GeoImportUtil.readProjectionFile(IOUtil.fileToURL(f));
+ FileUtils.deleteDirectory(f.getParentFile());
}
}
\ No newline at end of file
More information about the Schmitzm-commits
mailing list