sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1517891 - in /sis/branches/JDK7: ide-project/NetBeans/ storage/sis-shapefile/data/ storage/sis-shapefile/src/test/java/org/apache/sis/storage/shapefile/ storage/sis-shapefile/src/test/java/org/apache/sis/storage/shapefile/test/ storage/sis...
Date Tue, 27 Aug 2013 17:29:44 GMT
Author: desruisseaux
Date: Tue Aug 27 17:29:43 2013
New Revision: 1517891

URL: http://svn.apache.org/r1517891
Log:
Moved test resources to the standard Maven location.

Added:
    sis/branches/JDK7/storage/sis-shapefile/src/test/java/org/apache/sis/storage/shapefile/CmdLineDriverTest.java
      - copied, changed from r1517878, sis/branches/JDK7/storage/sis-shapefile/src/test/java/org/apache/sis/storage/shapefile/test/CmdLineDriverTest.java
    sis/branches/JDK7/storage/sis-shapefile/src/test/java/org/apache/sis/storage/shapefile/ShapeFileTest.java
      - copied, changed from r1517878, sis/branches/JDK7/storage/sis-shapefile/src/test/java/org/apache/sis/storage/shapefile/test/ShapeFileTest.java
    sis/branches/JDK7/storage/sis-shapefile/src/test/resources/
    sis/branches/JDK7/storage/sis-shapefile/src/test/resources/org/
    sis/branches/JDK7/storage/sis-shapefile/src/test/resources/org/apache/
    sis/branches/JDK7/storage/sis-shapefile/src/test/resources/org/apache/sis/
    sis/branches/JDK7/storage/sis-shapefile/src/test/resources/org/apache/sis/storage/
    sis/branches/JDK7/storage/sis-shapefile/src/test/resources/org/apache/sis/storage/shapefile/
      - copied from r1517890, sis/branches/JDK7/storage/sis-shapefile/data/
Removed:
    sis/branches/JDK7/storage/sis-shapefile/data/
    sis/branches/JDK7/storage/sis-shapefile/src/test/java/org/apache/sis/storage/shapefile/test/
Modified:
    sis/branches/JDK7/ide-project/NetBeans/build.xml

Modified: sis/branches/JDK7/ide-project/NetBeans/build.xml
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/ide-project/NetBeans/build.xml?rev=1517891&r1=1517890&r2=1517891&view=diff
==============================================================================
--- sis/branches/JDK7/ide-project/NetBeans/build.xml (original)
+++ sis/branches/JDK7/ide-project/NetBeans/build.xml Tue Aug 27 17:29:43 2013
@@ -94,6 +94,14 @@
       </fileset>
     </copy>
     <copy todir="${build.test.classes.dir}">
+      <fileset dir="${project.root}/storage/sis-shapefile/src/test/resources">
+        <include name="**/*.dbf"/>
+        <include name="**/*.prj"/>
+        <include name="**/*.shp"/>
+        <include name="**/*.shx"/>
+      </fileset>
+    </copy>
+    <copy todir="${build.test.classes.dir}">
       <fileset dir="${project.root}/profiles/sis-french-profile/src/test/resources">
         <include name="**/*.xml"/>
       </fileset>

Copied: sis/branches/JDK7/storage/sis-shapefile/src/test/java/org/apache/sis/storage/shapefile/CmdLineDriverTest.java
(from r1517878, sis/branches/JDK7/storage/sis-shapefile/src/test/java/org/apache/sis/storage/shapefile/test/CmdLineDriverTest.java)
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/storage/sis-shapefile/src/test/java/org/apache/sis/storage/shapefile/CmdLineDriverTest.java?p2=sis/branches/JDK7/storage/sis-shapefile/src/test/java/org/apache/sis/storage/shapefile/CmdLineDriverTest.java&p1=sis/branches/JDK7/storage/sis-shapefile/src/test/java/org/apache/sis/storage/shapefile/test/CmdLineDriverTest.java&r1=1517878&r2=1517891&rev=1517891&view=diff
==============================================================================
--- sis/branches/JDK7/storage/sis-shapefile/src/test/java/org/apache/sis/storage/shapefile/test/CmdLineDriverTest.java
[UTF-8] (original)
+++ sis/branches/JDK7/storage/sis-shapefile/src/test/java/org/apache/sis/storage/shapefile/CmdLineDriverTest.java
[UTF-8] Tue Aug 27 17:29:43 2013
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.sis.storage.shapefile.test;
+package org.apache.sis.storage.shapefile;
 
 import java.io.IOException;
 import org.junit.Test;

Copied: sis/branches/JDK7/storage/sis-shapefile/src/test/java/org/apache/sis/storage/shapefile/ShapeFileTest.java
(from r1517878, sis/branches/JDK7/storage/sis-shapefile/src/test/java/org/apache/sis/storage/shapefile/test/ShapeFileTest.java)
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/storage/sis-shapefile/src/test/java/org/apache/sis/storage/shapefile/ShapeFileTest.java?p2=sis/branches/JDK7/storage/sis-shapefile/src/test/java/org/apache/sis/storage/shapefile/ShapeFileTest.java&p1=sis/branches/JDK7/storage/sis-shapefile/src/test/java/org/apache/sis/storage/shapefile/test/ShapeFileTest.java&r1=1517878&r2=1517891&rev=1517891&view=diff
==============================================================================
--- sis/branches/JDK7/storage/sis-shapefile/src/test/java/org/apache/sis/storage/shapefile/test/ShapeFileTest.java
[UTF-8] (original)
+++ sis/branches/JDK7/storage/sis-shapefile/src/test/java/org/apache/sis/storage/shapefile/ShapeFileTest.java
[UTF-8] Tue Aug 27 17:29:43 2013
@@ -14,12 +14,13 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.sis.storage.shapefile.test;
+package org.apache.sis.storage.shapefile;
 
+import java.io.File;
 import java.io.IOException;
 
+import java.net.URISyntaxException;
 import org.apache.sis.storage.DataStoreException;
-import org.apache.sis.storage.shapefile.ShapeFile;
 import org.junit.Test;
 
 import static junit.framework.Assert.assertEquals;
@@ -33,21 +34,25 @@ import static junit.framework.Assert.ass
  * @module
  */
 public final strictfp class ShapeFileTest {
+    private static String path(final String name) throws IOException, URISyntaxException
{
+        return new File(ShapeFileTest.class.getResource(name).toURI()).getPath();
+    }
+
     @Test
-    public void testPolyineCount() throws IOException, DataStoreException {
-        ShapeFile shp = new ShapeFile("data/SignedBikeRoute_4326_clipped.shp");
+    public void testPolyineCount() throws URISyntaxException, IOException, DataStoreException
{
+        ShapeFile shp = new ShapeFile(path("SignedBikeRoute_4326_clipped.shp"));
         assertEquals(shp.FeatureMap.size(), shp.FeatureCount);
     }
 
     @Test
-    public void testPolygonCount() throws IOException, DataStoreException {
-        ShapeFile shp = new ShapeFile("data/ANC90Ply_4326.shp");
+    public void testPolygonCount() throws URISyntaxException, IOException, DataStoreException
{
+        ShapeFile shp = new ShapeFile(path("ANC90Ply_4326.shp"));
         assertEquals(shp.FeatureMap.size(), shp.FeatureCount);
     }
 
     @Test
-    public void testPointCount() throws IOException, DataStoreException {
-        ShapeFile shp = new ShapeFile("data/ABRALicenseePt_4326_clipped.shp");
+    public void testPointCount() throws URISyntaxException, IOException, DataStoreException
{
+        ShapeFile shp = new ShapeFile(path("ABRALicenseePt_4326_clipped.shp"));
         assertEquals(shp.FeatureMap.size(), shp.FeatureCount);
     }
 }



Mime
View raw message