sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1633035 [2/2] - in /sis/branches/JDK7: ./ core/sis-feature/src/main/java/org/apache/sis/feature/ core/sis-feature/src/test/java/org/apache/sis/feature/ core/sis-metadata/src/main/java/org/apache/sis/metadata/ core/sis-metadata/src/main/jav...
Date Mon, 20 Oct 2014 05:37:04 GMT
Modified: sis/branches/JDK7/storage/sis-shapefile/src/test/java/org/apache/sis/storage/shapefile/ShapeFileTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/storage/sis-shapefile/src/test/java/org/apache/sis/storage/shapefile/ShapeFileTest.java?rev=1633035&r1=1633034&r2=1633035&view=diff
==============================================================================
--- sis/branches/JDK7/storage/sis-shapefile/src/test/java/org/apache/sis/storage/shapefile/ShapeFileTest.java
[UTF-8] (original)
+++ sis/branches/JDK7/storage/sis-shapefile/src/test/java/org/apache/sis/storage/shapefile/ShapeFileTest.java
[UTF-8] Mon Oct 20 05:37:03 2014
@@ -27,32 +27,57 @@ import static org.junit.Assert.*;
 
 
 /**
+ * Tests the {@link ShapeFile} class.
  *
  * @author  Travis L. Pinney
- * @since   0.4
- * @version 0.4
+ * @since   0.5
+ * @version 0.5
  * @module
  */
 public final strictfp class ShapeFileTest extends TestCase {
-    private static String path(final String name) throws IOException, URISyntaxException
{
+    /**
+     * Returns URI path to a resource.
+     * @param name Resource name.
+     * @return URI path.
+     * @throws URISyntaxException if the resource name is incorrect.
+     */
+    private static String path(final String name) throws URISyntaxException {
         return new File(ShapeFileTest.class.getResource(name).toURI()).getPath();
     }
 
+    /**
+     * Test polylines count.
+     * @throws URISyntaxException if the resource name is incorrect.
+     * @throws IOException if the shapefile cannot be found or an I/O error occurs.
+     * @throws DataStoreException if the shapefile has a structure problem.
+     */
     @Test
     public void testPolyineCount() throws URISyntaxException, IOException, DataStoreException
{
         ShapeFile shp = new ShapeFile(path("SignedBikeRoute_4326_clipped.shp"));
-        assertEquals(shp.FeatureMap.size(), shp.FeatureCount);
+        assertEquals(shp.FeatureMap.size(), shp.getFeatureCount());
     }
 
-    @Test
-    public void testPolygonCount() throws URISyntaxException, IOException, DataStoreException
{
+    /**
+     * Test polygon count.
+     * @throws URISyntaxException if the resource name is incorrect.
+     * @throws IOException if the shapefile cannot be found or an I/O error occurs.
+     * @throws DataStoreException if the shapefile has a structure problem.
+     */
+     @Test
+     public void testPolygonCount() throws URISyntaxException, IOException, DataStoreException
{
         ShapeFile shp = new ShapeFile(path("ANC90Ply_4326.shp"));
-        assertEquals(shp.FeatureMap.size(), shp.FeatureCount);
+        assertEquals(shp.FeatureMap.size(), shp.getFeatureCount());
     }
 
-    @Test
-    public void testPointCount() throws URISyntaxException, IOException, DataStoreException
{
+     /**
+      * Test point count.
+      * @throws URISyntaxException if the resource name is incorrect.
+      * @throws IOException if the shapefile cannot be found or an I/O error occurs.
+      * @throws DataStoreException if the shapefile has a structure problem.
+      */
+     @Test
+     public void testPointCount() throws URISyntaxException, IOException, DataStoreException
{
         ShapeFile shp = new ShapeFile(path("ABRALicenseePt_4326_clipped.shp"));
-        assertEquals(shp.FeatureMap.size(), shp.FeatureCount);
+        assertEquals(shp.FeatureMap.size(), shp.getFeatureCount());
     }
 }

Modified: sis/branches/JDK7/storage/sis-shapefile/src/test/java/org/apache/sis/test/suite/ShapefileTestSuite.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/storage/sis-shapefile/src/test/java/org/apache/sis/test/suite/ShapefileTestSuite.java?rev=1633035&r1=1633034&r2=1633035&view=diff
==============================================================================
--- sis/branches/JDK7/storage/sis-shapefile/src/test/java/org/apache/sis/test/suite/ShapefileTestSuite.java
[UTF-8] (original)
+++ sis/branches/JDK7/storage/sis-shapefile/src/test/java/org/apache/sis/test/suite/ShapefileTestSuite.java
[UTF-8] Mon Oct 20 05:37:03 2014
@@ -26,7 +26,8 @@ import org.junit.BeforeClass;
  */
 @Suite.SuiteClasses({
     org.apache.sis.storage.shapefile.ShapeFileTest.class,
-    org.apache.sis.storage.shapefile.CmdLineDriverTest.class
+    org.apache.sis.internal.shapefile.jdbc.ConnectionTest.class,
+    org.apache.sis.internal.shapefile.jdbc.ResultSetTest.class
 })
 public final strictfp class ShapefileTestSuite extends TestSuite {
     /**



Mime
View raw message