sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject [sis] 04/04: Add tests on a "Moving Features" file.
Date Mon, 19 Oct 2020 14:47:27 GMT
This is an automated email from the ASF dual-hosted git repository.

desruisseaux pushed a commit to branch geoapi-4.0
in repository https://gitbox.apache.org/repos/asf/sis.git

commit 248df22d33d177cd539c8ab8bb79f4bda6c4ae45
Author: Martin Desruisseaux <martin.desruisseaux@geomatys.com>
AuthorDate: Mon Oct 19 16:25:36 2020 +0200

    Add tests on a "Moving Features" file.
---
 .../java/org/apache/sis/internal/jdk9/JDK9.java    |  18 +++
 .../org/apache/sis/internal/netcdf/Decoder.java    |   9 --
 .../org/apache/sis/internal/netcdf/Variable.java   |  43 ++----
 .../sis/internal/netcdf/impl/ChannelDecoder.java   |   3 +-
 .../sis/internal/netcdf/impl/VariableInfo.java     |  43 ++++++
 .../sis/internal/netcdf/ucar/DecoderWrapper.java   |  13 --
 .../sis/internal/netcdf/ucar/VariableWrapper.java  |  41 ++++++
 .../apache/sis/internal/netcdf/FeatureSetTest.java | 164 +++++++++++++++++++++
 .../sis/internal/netcdf/impl/FeatureSetTest.java   |  47 ++++++
 .../org/apache/sis/test/suite/NetcdfTestSuite.java |   4 +-
 10 files changed, 326 insertions(+), 59 deletions(-)

diff --git a/core/sis-utility/src/main/java/org/apache/sis/internal/jdk9/JDK9.java b/core/sis-utility/src/main/java/org/apache/sis/internal/jdk9/JDK9.java
index 3ad93ce..63bfd5c 100644
--- a/core/sis-utility/src/main/java/org/apache/sis/internal/jdk9/JDK9.java
+++ b/core/sis-utility/src/main/java/org/apache/sis/internal/jdk9/JDK9.java
@@ -164,6 +164,24 @@ public final class JDK9 {
      * Place holder for {@link java.util.Arrays} method added in JDK9.
      * This placeholder does not perform range check (JDK9 method does).
      */
+    public static boolean equals(final char[] a, int ai, final int aUp,
+                                 final char[] b, int bi, final int bUp)
+    {
+        if (aUp - ai != bUp - bi) {
+            return false;
+        }
+        while (ai < aUp) {
+            if (a[ai++] != b[bi++]) {
+                return false;
+            }
+        }
+        return true;
+    }
+
+    /**
+     * Place holder for {@link java.util.Arrays} method added in JDK9.
+     * This placeholder does not perform range check (JDK9 method does).
+     */
     public static boolean equals(final byte[] a, int ai, final int aUp,
                                  final byte[] b, int bi, final int bUp)
     {
diff --git a/storage/sis-netcdf/src/main/java/org/apache/sis/internal/netcdf/Decoder.java
b/storage/sis-netcdf/src/main/java/org/apache/sis/internal/netcdf/Decoder.java
index e0a072f..cc3a60b 100644
--- a/storage/sis-netcdf/src/main/java/org/apache/sis/internal/netcdf/Decoder.java
+++ b/storage/sis-netcdf/src/main/java/org/apache/sis/internal/netcdf/Decoder.java
@@ -29,7 +29,6 @@ import java.util.logging.LogRecord;
 import java.io.Closeable;
 import java.io.IOException;
 import java.nio.file.Path;
-import java.nio.charset.Charset;
 import org.opengis.util.NameSpace;
 import org.opengis.util.NameFactory;
 import org.opengis.referencing.datum.Datum;
@@ -368,14 +367,6 @@ public abstract class Decoder extends ReferencingFactoryContainer implements
Clo
     }
 
     /**
-     * Returns the encoding for attribute or variable data.
-     * This is <strong>not</strong> the encoding of netCDF names.
-     *
-     * @return encoding of data (not the encoding of netCDF names).
-     */
-    public abstract Charset getEncoding();
-
-    /**
      * Returns all variables found in the netCDF file.
      * This method may return a direct reference to an internal array - do not modify.
      *
diff --git a/storage/sis-netcdf/src/main/java/org/apache/sis/internal/netcdf/Variable.java
b/storage/sis-netcdf/src/main/java/org/apache/sis/internal/netcdf/Variable.java
index a777b8c..d964ee4 100644
--- a/storage/sis-netcdf/src/main/java/org/apache/sis/internal/netcdf/Variable.java
+++ b/storage/sis-netcdf/src/main/java/org/apache/sis/internal/netcdf/Variable.java
@@ -23,7 +23,6 @@ import java.util.ArrayList;
 import java.util.Locale;
 import java.util.regex.Pattern;
 import java.io.IOException;
-import java.nio.charset.Charset;
 import java.time.Instant;
 import javax.measure.Unit;
 import javax.measure.format.ParserException;
@@ -42,7 +41,6 @@ import org.apache.sis.util.ArraysExt;
 import org.apache.sis.util.CharSequences;
 import org.apache.sis.util.collection.Containers;
 import org.apache.sis.util.collection.WeakHashSet;
-import org.apache.sis.internal.jdk9.JDK9;
 import org.apache.sis.internal.util.Numerics;
 import org.apache.sis.internal.util.CollectionsExt;
 import org.apache.sis.internal.util.UnmodifiableArrayList;
@@ -1010,7 +1008,7 @@ public abstract class Variable extends Node {
                 while (n > 0) {
                     count = Math.multiplyExact(count, Math.toIntExact(dimensions.get(--n).length()));
                 }
-                final String[] strings = createStringArray((byte[]) array, count, length,
decoder.getEncoding());
+                final String[] strings = createStringArray(array, count, length);
                 /*
                  * Following method calls take the array reference without cloning it.
                  * Consequently creating those two objects now (even if we may not use them)
is reasonably cheap.
@@ -1058,39 +1056,16 @@ public abstract class Variable extends Node {
      * For each element, leading and trailing spaces and control codes are trimmed.
      * The array does not contain null element but may contain empty strings.
      *
-     * @param  chars     the "two-dimensional" array of characters stored in a flat array.
-     * @param  count     number of string elements (size of first dimension).
-     * @param  length    number of characters in each element (size of second dimension).
-     * @param  encoding  conversion from bytes to characters.
+     * <p>The implementation of this method is the same code duplicated in subclasses,
+     * except that one subclass (the SIS implementation) expects a {@code byte[]} array
+     * and the other subclass (the wrapper around UCAR library) expects a {@code char[]}
array.</p>
+     *
+     * @param  chars   the "two-dimensional" array stored in a flat {@code byte[]} or {@code
char[]} array.
+     * @param  count   number of string elements (size of first dimension).
+     * @param  length  number of characters in each element (size of second dimension).
      * @return array of character strings.
      */
-    private static String[] createStringArray(final byte[] chars, final int count, final
int length, final Charset encoding) {
-        final String[] strings = new String[count];
-        String previous = "";                       // For sharing same `String` instances
when same value is repeated.
-        int plo = 0, phi = 0;                       // Index range of bytes used for building
the previous string.
-        int lower = 0;
-        for (int i=0; i<count; i++) {
-            String element = "";
-            final int upper = lower + length;
-            for (int j=upper; --j >= lower;) {
-                if (Byte.toUnsignedInt(chars[j]) > ' ') {
-                    while (Byte.toUnsignedInt(chars[lower]) <= ' ') lower++;
-                    if (JDK9.equals(chars, lower, ++j, chars, plo, phi)) {
-                        element = previous;
-                    } else {
-                        element  = new String(chars, lower, j - lower, encoding);
-                        previous = element;
-                        plo      = lower;
-                        phi      = j;
-                    }
-                    break;
-                }
-            }
-            strings[i] = element;
-            lower = upper;
-        }
-        return strings;
-    }
+    protected abstract String[] createStringArray(Object chars, int count, int length);
 
     /**
      * Wraps the given data in a {@link Vector} with the assumption that accuracy in base
10 matters.
diff --git a/storage/sis-netcdf/src/main/java/org/apache/sis/internal/netcdf/impl/ChannelDecoder.java
b/storage/sis-netcdf/src/main/java/org/apache/sis/internal/netcdf/impl/ChannelDecoder.java
index 2f4ce79..9634945 100644
--- a/storage/sis-netcdf/src/main/java/org/apache/sis/internal/netcdf/impl/ChannelDecoder.java
+++ b/storage/sis-netcdf/src/main/java/org/apache/sis/internal/netcdf/impl/ChannelDecoder.java
@@ -877,8 +877,7 @@ public final class ChannelDecoder extends Decoder {
      *
      * @return encoding of data (not the encoding of netCDF names).
      */
-    @Override
-    public Charset getEncoding() {
+    final Charset getEncoding() {
         return encoding;
     }
 
diff --git a/storage/sis-netcdf/src/main/java/org/apache/sis/internal/netcdf/impl/VariableInfo.java
b/storage/sis-netcdf/src/main/java/org/apache/sis/internal/netcdf/impl/VariableInfo.java
index 89de616..ee2577e 100644
--- a/storage/sis-netcdf/src/main/java/org/apache/sis/internal/netcdf/impl/VariableInfo.java
+++ b/storage/sis-netcdf/src/main/java/org/apache/sis/internal/netcdf/impl/VariableInfo.java
@@ -25,11 +25,13 @@ import java.util.Collection;
 import java.util.Collections;
 import java.util.regex.Matcher;
 import java.io.IOException;
+import java.nio.charset.Charset;
 import javax.measure.Unit;
 import ucar.nc2.constants.CF;
 import ucar.nc2.constants.CDM;
 import ucar.nc2.constants._Coordinate;
 import org.apache.sis.coverage.grid.GridExtent;
+import org.apache.sis.internal.jdk9.JDK9;
 import org.apache.sis.internal.netcdf.Decoder;
 import org.apache.sis.internal.netcdf.DataType;
 import org.apache.sis.internal.netcdf.Dimension;
@@ -674,6 +676,47 @@ final class VariableInfo extends Variable implements Comparable<VariableInfo>
{
     }
 
     /**
+     * Creates an array of character strings from a "two-dimensional" array of bytes stored
in a flat array.
+     * For each element, leading and trailing spaces and control codes are trimmed.
+     * The array does not contain null element but may contain empty strings.
+     *
+     * @param  array     the "two-dimensional" array of characters stored in a flat {@code
byte[]} array.
+     * @param  count     number of string elements (size of first dimension).
+     * @param  length    number of characters in each element (size of second dimension).
+     * @return array of character strings.
+     */
+    @Override
+    protected String[] createStringArray(final Object array, final int count, final int length)
{
+        final byte[] chars = (byte[]) array;
+        final Charset encoding = ((ChannelDecoder) decoder).getEncoding();
+        final String[] strings = new String[count];
+        String previous = "";                       // For sharing same `String` instances
when same value is repeated.
+        int plo = 0, phi = 0;                       // Index range of bytes used for building
the previous string.
+        int lower = 0;
+        for (int i=0; i<count; i++) {
+            String element = "";
+            final int upper = lower + length;
+            for (int j=upper; --j >= lower;) {
+                if (Byte.toUnsignedInt(chars[j]) > ' ') {
+                    while (Byte.toUnsignedInt(chars[lower]) <= ' ') lower++;
+                    if (JDK9.equals(chars, lower, ++j, chars, plo, phi)) {
+                        element = previous;
+                    } else {
+                        element  = new String(chars, lower, j - lower, encoding);
+                        previous = element;
+                        plo      = lower;
+                        phi      = j;
+                    }
+                    break;
+                }
+            }
+            strings[i] = element;
+            lower = upper;
+        }
+        return strings;
+    }
+
+    /**
      * Returns a coordinate for this two-dimensional grid coordinate axis.
      * This is (indirectly) a callback method for {@link Grid#getAxes(Decoder)}.
      *
diff --git a/storage/sis-netcdf/src/main/java/org/apache/sis/internal/netcdf/ucar/DecoderWrapper.java
b/storage/sis-netcdf/src/main/java/org/apache/sis/internal/netcdf/ucar/DecoderWrapper.java
index 64496d5..36a6bda 100644
--- a/storage/sis-netcdf/src/main/java/org/apache/sis/internal/netcdf/ucar/DecoderWrapper.java
+++ b/storage/sis-netcdf/src/main/java/org/apache/sis/internal/netcdf/ucar/DecoderWrapper.java
@@ -24,8 +24,6 @@ import java.util.Formatter;
 import java.util.Collection;
 import java.util.Collections;
 import java.io.IOException;
-import java.nio.charset.Charset;
-import java.nio.charset.StandardCharsets;
 import ucar.nc2.Group;
 import ucar.nc2.Attribute;
 import ucar.nc2.VariableIF;
@@ -385,17 +383,6 @@ public final class DecoderWrapper extends Decoder implements CancelTask
{
     }
 
     /**
-     * Returns the encoding for attribute or variable data.
-     * This is <strong>not</strong> the encoding of netCDF names.
-     *
-     * @return encoding of data (not the encoding of netCDF names).
-     */
-    @Override
-    public Charset getEncoding() {
-        return StandardCharsets.ISO_8859_1;
-    }
-
-    /**
      * Returns all variables found in the netCDF file.
      * This method returns a direct reference to an internal array - do not modify.
      *
diff --git a/storage/sis-netcdf/src/main/java/org/apache/sis/internal/netcdf/ucar/VariableWrapper.java
b/storage/sis-netcdf/src/main/java/org/apache/sis/internal/netcdf/ucar/VariableWrapper.java
index 96b0100..37b0ec5 100644
--- a/storage/sis-netcdf/src/main/java/org/apache/sis/internal/netcdf/ucar/VariableWrapper.java
+++ b/storage/sis-netcdf/src/main/java/org/apache/sis/internal/netcdf/ucar/VariableWrapper.java
@@ -47,6 +47,7 @@ import org.apache.sis.internal.netcdf.GridAdjustment;
 import org.apache.sis.internal.netcdf.Variable;
 import org.apache.sis.internal.util.UnmodifiableArrayList;
 import org.apache.sis.internal.util.Strings;
+import org.apache.sis.internal.jdk9.JDK9;
 import org.apache.sis.storage.DataStoreException;
 import org.apache.sis.storage.netcdf.AttributeNames;
 import org.apache.sis.measure.MeasurementRange;
@@ -523,6 +524,46 @@ final class VariableWrapper extends Variable {
     }
 
     /**
+     * Creates an array of character strings from a "two-dimensional" array of characters
stored in a flat array.
+     * For each element, leading and trailing spaces and control codes are trimmed.
+     * The array does not contain null element but may contain empty strings.
+     *
+     * @param  array     the "two-dimensional" array of characters stored in a flat {@code
char[]} array.
+     * @param  count     number of string elements (size of first dimension).
+     * @param  length    number of characters in each element (size of second dimension).
+     * @return array of character strings.
+     */
+    @Override
+    protected String[] createStringArray(final Object array, final int count, final int length)
{
+        final char[] chars = (char[]) array;
+        final String[] strings = new String[count];
+        String previous = "";                       // For sharing same `String` instances
when same value is repeated.
+        int plo = 0, phi = 0;                       // Index range of bytes used for building
the previous string.
+        int lower = 0;
+        for (int i=0; i<count; i++) {
+            String element = "";
+            final int upper = lower + length;
+            for (int j=upper; --j >= lower;) {
+                if (chars[j] > ' ') {
+                    while (chars[lower] <= ' ') lower++;
+                    if (JDK9.equals(chars, lower, ++j, chars, plo, phi)) {
+                        element = previous;
+                    } else {
+                        element  = new String(chars, lower, j - lower);
+                        previous = element;
+                        plo      = lower;
+                        phi      = j;
+                    }
+                    break;
+                }
+            }
+            strings[i] = element;
+            lower = upper;
+        }
+        return strings;
+    }
+
+    /**
      * Returns a coordinate for this two-dimensional grid coordinate axis.
      * This is (indirectly) a callback method for {@link Grid#getAxes(Decoder)}.
      */
diff --git a/storage/sis-netcdf/src/test/java/org/apache/sis/internal/netcdf/FeatureSetTest.java
b/storage/sis-netcdf/src/test/java/org/apache/sis/internal/netcdf/FeatureSetTest.java
new file mode 100644
index 0000000..c4db0fa
--- /dev/null
+++ b/storage/sis-netcdf/src/test/java/org/apache/sis/internal/netcdf/FeatureSetTest.java
@@ -0,0 +1,164 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.sis.internal.netcdf;
+
+import java.awt.Shape;
+import java.awt.geom.PathIterator;
+import java.util.Iterator;
+import java.util.Collection;
+import java.io.IOException;
+import org.apache.sis.storage.DataStoreException;
+import org.apache.sis.test.DependsOn;
+import org.junit.Test;
+
+import static org.junit.Assert.*;
+
+// Branch-dependent imports
+import org.opengis.feature.Feature;
+import org.opengis.feature.FeatureType;
+import org.opengis.feature.PropertyType;
+import org.opengis.feature.AttributeType;
+import org.opengis.test.dataset.TestData;
+
+
+/**
+ * Tests the {@link FeatureSet} implementation. The default implementation uses the UCAR
library,
+ * which is is our reference implementation. Subclass overrides {@link #createDecoder(TestData)}
+ * method in order to test a different implementation.
+ *
+ * @author  Martin Desruisseaux (Geomatys)
+ * @version 1.1
+ * @since   1.1
+ * @module
+ */
+@DependsOn(VariableTest.class)
+public strictfp class FeatureSetTest extends TestCase {
+    /**
+     * Type of the features read from the netCDF file.
+     */
+    private FeatureType type;
+
+    /**
+     * Index of the feature to verify.
+     */
+    private int featureIndex;
+
+    /**
+     * Tests {@link FeatureSet} with a moving features file.
+     *
+     * @throws IOException if an I/O error occurred while opening the file.
+     * @throws DataStoreException if a logical error occurred.
+     */
+    @Test
+    public void testMovingFeatures() throws IOException, DataStoreException {
+        final FeatureSet[] features = FeatureSet.create(selectDataset(TestData.MOVING_FEATURES));
+        assertEquals(1, features.length);
+        type = features[0].getType();
+        verifyType(type.getProperties(false).iterator());
+        features[0].features(false).forEach(this::verifyInstance);
+    }
+
+    /**
+     * Verifies that given properties are the expected ones
+     * for {@link TestData#MOVING_FEATURES} feature type.
+     */
+    private static void verifyType(final Iterator<? extends PropertyType> it) {
+        assertEquals("sis:identifier", it.next().getName().toString());
+        assertEquals("sis:envelope",   it.next().getName().toString());
+        assertEquals("sis:geometry",   it.next().getName().toString());
+
+        AttributeType<?> at = (AttributeType<?>) it.next();
+        assertEquals("features", at.getName().toString());
+
+        at = (AttributeType<?>) it.next();
+        assertEquals("trajectory", at.getName().toString());
+        assertEquals(Shape.class, at.getValueClass());
+
+        at = (AttributeType<?>) it.next();
+        assertEquals("stations", at.getName().toString());
+        assertEquals(String.class, at.getValueClass());
+
+        assertFalse(it.hasNext());
+    }
+
+    /**
+     * Verifies the given feature instance.
+     */
+    private void verifyInstance(final Feature instance) {
+        assertSame(type, instance.getType());
+        final float[] longitudes, latitudes;
+        final String[] stations;
+        final String identifier;
+        switch (featureIndex++) {
+            case 0: {
+                identifier = "a4078a16";
+                longitudes = new float[] {139.622715f, 139.696899f, 139.740440f, 139.759640f,
139.763328f, 139.766084f};
+                latitudes  = new float[] { 35.466188f,  35.531328f,  35.630152f,  35.665498f,
 35.675069f,  35.681382f};
+                stations   = new String[] {
+                    "Yokohama", "Kawasaki", "Shinagawa", "Shinbashi", "Yurakucho", "Tokyo"
+                };
+                break;
+            }
+            case 1: {
+                identifier = "1e146c16";
+                longitudes = new float[] {139.700258f, 139.730667f, 139.763786f, 139.774219f};
+                latitudes  = new float[] { 35.690921f,  35.686014f,  35.699855f,  35.698683f};
+                stations   = new String[] {
+                    "Shinjuku", "Yotsuya", "Ochanomizu", "Akihabara"
+                };
+                break;
+            }
+            case 2: {
+                identifier = "f50ff004";
+                longitudes = new float[] {139.649867f, 139.665652f, 139.700258f};
+                latitudes  = new float[] { 35.705385f,  35.706032f,  35.690921f};
+                stations   = new String[] {
+                    "Koenji", "Nakano", "Shinjuku"
+                };
+                break;
+            }
+            default: {
+                fail("Unexpected feature instance.");
+                return;
+            }
+        }
+        assertEquals("identifier", identifier, instance.getPropertyValue("features"));
+        asserLineStringEquals((Shape) instance.getPropertyValue("trajectory"), longitudes,
latitudes);
+        assertArrayEquals("stations", stations, ((Collection<?>) instance.getPropertyValue("stations")).toArray());
+    }
+
+    /**
+     * Asserts the the given shape is a line string with the following coordinates.
+     *
+     * @param  trajectory  the shape to verify.
+     * @param  x           expected X coordinates.
+     * @param  y           expected Y coordinates.
+     */
+    private static void asserLineStringEquals(final Shape trajectory, final float[] x, final
float[] y) {
+        assertEquals(x.length, y.length);
+        final PathIterator it = trajectory.getPathIterator(null);
+        final float[] point = new float[2];
+        for (int i=0; i < x.length; i++) {
+            assertFalse(it.isDone());
+            assertEquals(i == 0 ? PathIterator.SEG_MOVETO : PathIterator.SEG_LINETO, it.currentSegment(point));
+            assertEquals("x", x[i], point[0], STRICT);
+            assertEquals("y", y[i], point[1], STRICT);
+            it.next();
+        }
+        assertTrue(it.isDone());
+    }
+}
diff --git a/storage/sis-netcdf/src/test/java/org/apache/sis/internal/netcdf/impl/FeatureSetTest.java
b/storage/sis-netcdf/src/test/java/org/apache/sis/internal/netcdf/impl/FeatureSetTest.java
new file mode 100644
index 0000000..a9c35b5
--- /dev/null
+++ b/storage/sis-netcdf/src/test/java/org/apache/sis/internal/netcdf/impl/FeatureSetTest.java
@@ -0,0 +1,47 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.sis.internal.netcdf.impl;
+
+import java.io.IOException;
+import org.opengis.test.dataset.TestData;
+import org.apache.sis.internal.netcdf.Decoder;
+import org.apache.sis.storage.DataStoreException;
+
+
+/**
+ * Tests the {@link org.apache.sis.internal.netcdf.FeatureSet} implementation
+ * using the Apache SIS implementation of netCDF reader.
+ *
+ * @author  Martin Desruisseaux (Geomatys)
+ * @version 1.1
+ * @since   1.1
+ * @module
+ */
+public final strictfp class FeatureSetTest extends org.apache.sis.internal.netcdf.FeatureSetTest
{
+    /**
+     * Creates a new decoder for the specified dataset.
+     *
+     * @param  file  the dataset as one of the above-cited constants.
+     * @return the decoder for the specified dataset.
+     * @throws IOException if an I/O error occurred while opening the file.
+     * @throws DataStoreException if a logical error occurred.
+     */
+    @Override
+    protected Decoder createDecoder(final TestData file) throws IOException, DataStoreException
{
+        return ChannelDecoderTest.createChannelDecoder(file);
+    }
+}
diff --git a/storage/sis-netcdf/src/test/java/org/apache/sis/test/suite/NetcdfTestSuite.java
b/storage/sis-netcdf/src/test/java/org/apache/sis/test/suite/NetcdfTestSuite.java
index b3d3495..64c89c2 100644
--- a/storage/sis-netcdf/src/test/java/org/apache/sis/test/suite/NetcdfTestSuite.java
+++ b/storage/sis-netcdf/src/test/java/org/apache/sis/test/suite/NetcdfTestSuite.java
@@ -25,7 +25,7 @@ import org.junit.BeforeClass;
  * All tests from the {@code sis-netcdf} module, in rough dependency order.
  *
  * @author  Martin Desruisseaux (Geomatys)
- * @version 1.0
+ * @version 1.1
  * @since   0.3
  * @module
  */
@@ -39,6 +39,8 @@ import org.junit.BeforeClass;
     org.apache.sis.internal.netcdf.impl.ChannelDecoderTest.class,
     org.apache.sis.internal.netcdf.impl.VariableInfoTest.class,
     org.apache.sis.internal.netcdf.impl.GridInfoTest.class,
+    org.apache.sis.internal.netcdf.FeatureSetTest.class,
+    org.apache.sis.internal.netcdf.impl.FeatureSetTest.class,
     org.apache.sis.storage.netcdf.MetadataReaderTest.class,
     org.apache.sis.storage.netcdf.NetcdfStoreProviderTest.class,
     org.apache.sis.storage.netcdf.NetcdfStoreTest.class


Mime
View raw message