sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1640009 - in /sis/branches/JDK8/core: sis-feature/src/main/java/org/apache/sis/feature/ sis-feature/src/test/java/org/apache/sis/feature/ sis-feature/src/test/java/org/apache/sis/test/suite/ sis-utility/src/main/java/org/apache/sis/util/re...
Date Sun, 16 Nov 2014 17:04:19 GMT
Author: desruisseaux
Date: Sun Nov 16 17:04:19 2014
New Revision: 1640009

URL: http://svn.apache.org/r1640009
Log:
Added tests.

Added:
    sis/branches/JDK8/core/sis-feature/src/test/java/org/apache/sis/feature/CharacteristicMapTest.java
      - copied, changed from r1639971, sis/branches/JDK8/core/sis-feature/src/test/java/org/apache/sis/feature/CharacteristicTypeMapTest.java
Modified:
    sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/AbstractAttribute.java
    sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/AbstractFeature.java
    sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/CharacteristicMap.java
    sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/DefaultAttributeType.java
    sis/branches/JDK8/core/sis-feature/src/test/java/org/apache/sis/feature/CharacteristicTypeMapTest.java
    sis/branches/JDK8/core/sis-feature/src/test/java/org/apache/sis/test/suite/FeatureTestSuite.java
    sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.java
    sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.properties
    sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors_fr.properties

Modified: sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/AbstractAttribute.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/AbstractAttribute.java?rev=1640009&r1=1640008&r2=1640009&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/AbstractAttribute.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/AbstractAttribute.java
[UTF-8] Sun Nov 16 17:04:19 2014
@@ -34,12 +34,16 @@ import org.opengis.feature.AttributeType
 
 /**
  * An instance of an {@linkplain DefaultAttributeType attribute type} containing the value
of an attribute in a feature.
- * {@code Attribute} holds two main information:
+ * {@code Attribute} holds three main information:
  *
  * <ul>
- *   <li>A reference to an {@linkplain DefaultAttributeType attribute type}
+ *   <li>A {@linkplain #getType() reference to an attribute type}
  *       which define the base Java type and domain of valid values.</li>
- *   <li>A value, which may be a singleton ([0 … 1] cardinality) or multi-valued
([0 … ∞] cardinality).</li>
+ *   <li>One or more {@linkplain #getValues() values}, which may be a singleton ([0
… 1] cardinality)
+ *       or multi-valued ([0 … ∞] cardinality).</li>
+ *   <li>Optional {@linkplain #characteristics() characteristics} about the attribute
+ *       (e.g. a <var>temperature</var> attribute may have a characteristic holding
the measurement <var>accuracy</var>).
+ *       Characteristics are often, but not necessarily, constant for all attributes of the
same type in a dataset.</li>
  * </ul>
  *
  * {@section Limitations}
@@ -212,8 +216,8 @@ public abstract class AbstractAttribute<
      * as shown in the <cite>Reading a characteristic</cite> section below.</p>
      *
      * <div class="note"><b>Rational:</b>
-     * Very often, all attributes of a given type in the same file have the same characteristics.
-     * For example it is very common that all temperature measurements in a file have the
same accuracy,
+     * Very often, all attributes of a given type in the same dataset have the same characteristics.
+     * For example it is very common that all temperature measurements in a dataset have
the same accuracy,
      * and setting a different accuracy for a single measurement is relatively rare.
      * Consequently, {@code characteristics.isEmpty()} is a convenient way to check that
an attribute have
      * all the "standard" characteristics and need no special processing.</div>

Modified: sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/AbstractFeature.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/AbstractFeature.java?rev=1640009&r1=1640008&r2=1640009&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/AbstractFeature.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/AbstractFeature.java
[UTF-8] Sun Nov 16 17:04:19 2014
@@ -385,7 +385,7 @@ public abstract class AbstractFeature im
     }
 
     /**
-     * Verifies if the given properties can be assigned to this feature.
+     * Verifies if the given property can be assigned to this feature.
      *
      * @param name Shall be {@code property.getName().toString()}.
      * @param property The property to verify.
@@ -400,7 +400,9 @@ public abstract class AbstractFeature im
             throw illegalPropertyType(base.getName(), property.getClass());
         }
         if (pt != base) {
-            throw new IllegalArgumentException(Errors.format(Errors.Keys.MismatchedPropertyType_1,
name));
+            throw new IllegalArgumentException(base == null
+                    ? Errors.format(Errors.Keys.PropertyNotFound_2, getName(), name)
+                    : Errors.format(Errors.Keys.MismatchedPropertyType_1, name));
         }
     }
 

Modified: sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/CharacteristicMap.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/CharacteristicMap.java?rev=1640009&r1=1640008&r2=1640009&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/CharacteristicMap.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/CharacteristicMap.java
[UTF-8] Sun Nov 16 17:04:19 2014
@@ -19,6 +19,7 @@ package org.apache.sis.feature;
 import java.util.Map;
 import java.util.Iterator;
 import java.util.NoSuchElementException;
+import org.opengis.util.GenericName;
 import org.apache.sis.util.ArgumentChecks;
 import org.apache.sis.util.resources.Errors;
 import org.apache.sis.internal.util.Cloner;
@@ -27,6 +28,7 @@ import org.apache.sis.internal.util.Abst
 
 // Branch-dependent imports
 import org.opengis.feature.Attribute;
+import org.opengis.feature.AttributeType;
 
 
 /**
@@ -178,6 +180,25 @@ final class CharacteristicMap extends Ab
     }
 
     /**
+     * Ensures that the given attribute type is the instance that we expect at the given
index.
+     * If the given instance is not the expected one, then an {@link IllegalArgumentException}
+     * will be thrown with an error message formatted using the name of expected and given
types.
+     *
+     * @param index Index of the expected attribute type.
+     * @param type  The actual attribute type.
+     */
+    private void verifyAttributeType(final int index, final AttributeType<?> type)
{
+        final AttributeType<?> expected = types.characterizedBy[index];
+        if (expected != type) {
+            final GenericName en = expected.getName();
+            final GenericName an = type.getName();
+            throw new IllegalArgumentException(String.valueOf(en).equals(String.valueOf(an))
+                    ? Errors.format(Errors.Keys.MismatchedPropertyType_1, en)
+                    : Errors.format(Errors.Keys.CanNotAssign_2, en.push(source.getName()),
an));
+        }
+    }
+
+    /**
      * Sets the attribute characteristic for the given name.
      *
      * @param  key The name of the characteristic to set.
@@ -187,9 +208,7 @@ final class CharacteristicMap extends Ab
     public Attribute<?> put(final String key, final Attribute<?> value) {
         final int index = indexOf(key);
         ArgumentChecks.ensureNonNull("value", value);
-        if (!types.characterizedBy[index].equals(value.getType())) {
-            throw new IllegalArgumentException(Errors.format(Errors.Keys.MismatchedPropertyType_1,
key));
-        }
+        verifyAttributeType(index, value.getType());
         if (characterizedBy == null) {
             characterizedBy = new Attribute<?>[types.characterizedBy.length];
         }
@@ -230,11 +249,8 @@ final class CharacteristicMap extends Ab
     @Override
     protected boolean addValue(final Attribute<?> value) {
         ArgumentChecks.ensureNonNull("value", value);
-        final String key = value.getName().toString();
-        final int index = indexOf(key);
-        if (!types.characterizedBy[index].equals(value.getType())) {
-            throw new IllegalArgumentException(Errors.format(Errors.Keys.MismatchedPropertyType_1,
key));
-        }
+        final int index = indexOf(value.getName().toString());
+        verifyAttributeType(index, value.getType());
         if (characterizedBy == null) {
             characterizedBy = new Attribute<?>[types.characterizedBy.length];
         }
@@ -245,7 +261,8 @@ final class CharacteristicMap extends Ab
         } else if (previous.equals(value)) {
             return false;
         } else {
-            throw new IllegalStateException(Errors.format(Errors.Keys.PropertyAlreadyExists_2,
source.getName(), key));
+            throw new IllegalStateException(Errors.format(
+                    Errors.Keys.PropertyAlreadyExists_2, source.getName(), value.getName()));
         }
     }
 
@@ -254,6 +271,9 @@ final class CharacteristicMap extends Ab
      */
     @Override
     protected Iterator<Map.Entry<String, Attribute<?>>> entryIterator()
{
+        if (characterizedBy == null) {
+            return null;
+        }
         return new Iterator<Map.Entry<String, Attribute<?>>>() {
             /** Index of the next element to return in the iteration. */
             private int index;
@@ -333,9 +353,7 @@ final class CharacteristicMap extends Ab
         @Override
         public Attribute<?> setValue(final Attribute<?> value) {
             ArgumentChecks.ensureNonNull("value", value);
-            if (!types.characterizedBy[index].equals(value.getType())) {
-                throw new IllegalArgumentException(Errors.format(Errors.Keys.MismatchedPropertyType_1,
getKey()));
-            }
+            verifyAttributeType(index, value.getType());
             final Attribute<?> previous = this.value;
             characterizedBy[index] = value;
             this.value = value;

Modified: sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/DefaultAttributeType.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/DefaultAttributeType.java?rev=1640009&r1=1640008&r2=1640009&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/DefaultAttributeType.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/DefaultAttributeType.java
[UTF-8] Sun Nov 16 17:04:19 2014
@@ -63,9 +63,9 @@ import org.opengis.feature.AttributeType
  * An {@code Attribute} can be characterized by other attributes. For example an attribute
that carries a measurement
  * (e.g. air temperature) may have another attribute that holds the measurement accuracy
(e.g. ±0.1°C).
  * The accuracy value is often constant for all instances of that attribute
- * (e.g. for all temperature measurements in the same file), but this is not mandatory.
+ * (e.g. for all temperature measurements in the same dataset), but this is not mandatory.
  * Such accuracy could be stored as an ordinary, independent, attribute (like an other column
in a table),
- * but storing accuracy as a <cite>characteristic</cite> of the measurement attribute
instead
+ * but storing accuracy as a {@linkplain #characteristics() characteristic} of the measurement
attribute instead
  * provides the following advantages:
  *
  * <ul>
@@ -285,7 +285,7 @@ public class DefaultAttributeType<V> ext
      *
      * <div class="note"><b>Example:</b>
      * An attribute that carries a measurement (e.g. air temperature) may have another attribute
that holds the
-     * measurement accuracy. The accuracy is often constant for all measurements in a file,
but not necessarily.
+     * measurement accuracy. The accuracy is often constant for all measurements in a dataset,
but not necessarily.
      * If the accuracy is a constant, then the characteristics {@linkplain #getDefaultValue()
default value}
      * shall hold that constant.
      * </div>

Copied: sis/branches/JDK8/core/sis-feature/src/test/java/org/apache/sis/feature/CharacteristicMapTest.java
(from r1639971, sis/branches/JDK8/core/sis-feature/src/test/java/org/apache/sis/feature/CharacteristicTypeMapTest.java)
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-feature/src/test/java/org/apache/sis/feature/CharacteristicMapTest.java?p2=sis/branches/JDK8/core/sis-feature/src/test/java/org/apache/sis/feature/CharacteristicMapTest.java&p1=sis/branches/JDK8/core/sis-feature/src/test/java/org/apache/sis/feature/CharacteristicTypeMapTest.java&r1=1639971&r2=1640009&rev=1640009&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-feature/src/test/java/org/apache/sis/feature/CharacteristicTypeMapTest.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-feature/src/test/java/org/apache/sis/feature/CharacteristicMapTest.java
[UTF-8] Sun Nov 16 17:04:19 2014
@@ -22,75 +22,125 @@ import org.apache.sis.test.DependsOn;
 import org.apache.sis.test.TestCase;
 import org.junit.Test;
 
-import static java.util.Collections.singletonMap;
-import static org.apache.sis.feature.DefaultAssociationRole.NAME_KEY;
-import static org.apache.sis.test.Assert.*;
+import static org.junit.Assert.*;
 
 // Branch-dependent imports
-import org.opengis.feature.AttributeType;
+import org.opengis.feature.Attribute;
 
 
 /**
- * Tests {@link CharacteristicTypeMap} indirectly, through {@link DefaultAttributeType} construction.
+ * Tests {@link CharacteristicMap} indirectly, through {@link AbstractAttribute} construction.
  *
  * @author  Martin Desruisseaux (Geomatys)
  * @since   0.5
  * @version 0.5
  * @module
  */
-@DependsOn(DefaultAttributeTypeTest.class)
-public final strictfp class CharacteristicTypeMapTest extends TestCase {
+@DependsOn(CharacteristicTypeMapTest.class)
+public final strictfp class CharacteristicMapTest extends TestCase {
     /**
-     * Creates an attribute type for a temperature measurement in °C with a ±0.1°C accuracy.
+     * Creates an attribute for a temperature measurement of 20°C with a ±0.1°C accuracy.
      *
-     * @return A {@code "temperature"} type attribute with two characteristics: {@code "accuracy"}
and {@code "units"}.
+     * @return A {@code "temperature"} attribute with two characteristics: {@code "accuracy"}
and {@code "units"}.
      */
-    public static DefaultAttributeType<Float> temperature() {
-        final DefaultAttributeType<?> units, accuracy;
-        units    = new DefaultAttributeType<>(singletonMap(NAME_KEY, "units"),    
 String.class, 1, 1, "°C", (DefaultAttributeType[]) null);
-        accuracy = new DefaultAttributeType<>(singletonMap(NAME_KEY, "accuracy"), 
  Float.class, 1, 1, 0.1f, (DefaultAttributeType[]) null);
-        return     new DefaultAttributeType<>(singletonMap(NAME_KEY, "temperature"),
Float.class, 1, 1, null, accuracy, units);
+    public static AbstractAttribute<Float> temperature() {
+        return new SingletonAttribute<>(CharacteristicTypeMapTest.temperature(), 20f);
     }
 
     /**
-     * Tests the creation of two attributes with the same characteristics.
-     * We expect those attributes to share the same {@link CharacteristicTypeMap} instance.
-     * We opportunistically test {@code equals} and {@code hashCode} first, because sharing
-     * is unlikely to work if those methods did not worked properly.
+     * Creates an attribute for the given characteristic.
+     *
+     * @param  temperature The attribute created by {@link #temperature()}.
+     * @param  name Either {@code "accuracy"} or {@code "units"}.
+     * @return An attribute for the given name.
      */
-    @Test
-    public void testTwoAttributes() {
-        final DefaultAttributeType<Float> t1 = temperature();
-        final DefaultAttributeType<Float> t2 = temperature();
-        assertNotSame(t1, t2); // Remaining of this test is useless if instances are the
same.
-        assertTrue  ("equals",   t1.equals(t2));
-        assertTrue  ("equals",   t2.equals(t1));
-        assertEquals("hashCode", t1.hashCode(), t2.hashCode());
-        assertSame  ("shared",   t1.characteristics(), t2.characteristics());
+    private static AbstractAttribute<?> create(final AbstractAttribute<?> temperature,
final String name) {
+        return new SingletonAttribute<>(((DefaultAttributeType<?>) temperature.getType()).characteristics().get(name));
     }
 
     /**
-     * Tests various methods from the {@link Map} interface.
+     * Tests adding explicitely a characteristic with {@link CharacteristicMap#put(String,
Attribute)}.
      */
     @Test
-    public void testMapMethods() {
-        final AttributeType<?> units, accuracy;
-        final DefaultAttributeType<Float> temperature = temperature();
-        final Map<String, AttributeType<?>> characteristics = temperature.characteristics();
-
-        assertFalse  ("isEmpty",        characteristics.isEmpty());
-        assertEquals ("size", 2,        characteristics.size());
-        assertTrue   ("containsKey",    characteristics.containsKey("units"));
-        assertTrue   ("containsKey",    characteristics.containsKey("accuracy"));
-        assertFalse  ("containsKey",    characteristics.containsKey("temperature"));
-        assertNotNull("get", units    = characteristics.get("units"));
-        assertNotNull("get", accuracy = characteristics.get("accuracy"));
-        assertNull   ("get",            characteristics.get("temperature"));
-        assertSame   ("get", units,     characteristics.get("units"));
-        assertSame   ("get", accuracy,  characteristics.get("accuracy"));
-        assertTrue   ("containsValue",  characteristics.containsValue(units));
-        assertTrue   ("containsValue",  characteristics.containsValue(accuracy));
-        assertFalse  ("containsValue",  characteristics.containsValue(temperature));
+    public void testPut() {
+        final AbstractAttribute<?>     temperature     = temperature();
+        final AbstractAttribute<?>     units           = create(temperature, "units");
+        final AbstractAttribute<?>     accuracy        = create(temperature, "accuracy");
+        final Map<String,Attribute<?>> characteristics = temperature.characteristics();
+        /*
+         * Verify that the map is initially empty.
+         */
+        assertTrue  ("isEmpty",       characteristics.isEmpty());
+        assertEquals("size", 0,       characteristics.size());
+        assertFalse ("containsKey",   characteristics.containsKey("units"));
+        assertFalse ("containsKey",   characteristics.containsKey("accuracy"));
+        assertFalse ("containsKey",   characteristics.containsKey("temperature"));
+        assertNull  ("get",           characteristics.get("units"));
+        assertNull  ("get",           characteristics.get("accuracy"));
+        assertNull  ("get",           characteristics.get("temperature"));
+        assertFalse ("containsValue", characteristics.containsValue(units));
+        assertFalse ("containsValue", characteristics.containsValue(accuracy));
+        assertFalse ("containsValue", characteristics.containsValue(temperature));
+        /*
+         * Store "units" characteristic and verify.
+         */
+        assertNull  ("put",           characteristics.put("units", units));
+        assertFalse ("isEmpty",       characteristics.isEmpty());
+        assertEquals("size", 1,       characteristics.size());
+        assertTrue  ("containsKey",   characteristics.containsKey("units"));
+        assertFalse ("containsKey",   characteristics.containsKey("accuracy"));
+        assertFalse ("containsKey",   characteristics.containsKey("temperature"));
+        assertSame  ("get", units,    characteristics.get("units"));
+        assertNull  ("get",           characteristics.get("accuracy"));
+        assertNull  ("get",           characteristics.get("temperature"));
+        assertTrue  ("containsValue", characteristics.containsValue(units));
+        assertFalse ("containsValue", characteristics.containsValue(accuracy));
+        assertFalse ("containsValue", characteristics.containsValue(temperature));
+        /*
+         * Store "accuracy" characteristic and verify.
+         */
+        assertNull  ("put",           characteristics.put("accuracy", accuracy));
+        assertFalse ("isEmpty",       characteristics.isEmpty());
+        assertEquals("size", 2,       characteristics.size());
+        assertTrue  ("containsKey",   characteristics.containsKey("units"));
+        assertTrue  ("containsKey",   characteristics.containsKey("accuracy"));
+        assertFalse ("containsKey",   characteristics.containsKey("temperature"));
+        assertSame  ("get", units,    characteristics.get("units"));
+        assertSame  ("get", accuracy, characteristics.get("accuracy"));
+        assertNull  ("get",           characteristics.get("temperature"));
+        assertTrue  ("containsValue", characteristics.containsValue(units));
+        assertTrue  ("containsValue", characteristics.containsValue(accuracy));
+        assertFalse ("containsValue", characteristics.containsValue(temperature));
+        /*
+         * Overwrite values. Map shall stay unchanged.
+         */
+        assertSame  ("put",  accuracy, characteristics.put("accuracy", accuracy));
+        assertSame  ("put",  units,    characteristics.put("units",    units));
+        assertEquals("size", 2,        characteristics.size());
+        /*
+         * Try putting an attribute for a non-existent name.
+         * Map shall stay unchanged.
+         */
+        try {
+            characteristics.put("dummy", units);
+            fail("Operation shall not have been allowed.");
+        } catch (IllegalArgumentException e) {
+            final String message = e.getMessage();
+            assertTrue(message, message.contains("dummy"));       // Message shall contain
the wrong name.
+            assertTrue(message, message.contains("temperature")); // Message shall contain
the enclosing attribute name.
+        }
+        /*
+         * Try putting an attribute of the wrong type.
+         * Map shall stay unchanged.
+         */
+        try {
+            characteristics.put("units", accuracy);
+            fail("Operation shall not have been allowed.");
+        } catch (IllegalArgumentException e) {
+            final String message = e.getMessage();
+            assertTrue(message, message.contains("accuracy"));
+            assertTrue(message, message.contains("temperature:units"));
+        }
         assertArrayEquals("keySet", new String[] {"accuracy", "units"}, characteristics.keySet().toArray());
         assertArrayEquals("values", new Object[] { accuracy ,  units }, characteristics.values().toArray());
         assertArrayEquals("entrySet", new Object[] {

Modified: sis/branches/JDK8/core/sis-feature/src/test/java/org/apache/sis/feature/CharacteristicTypeMapTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-feature/src/test/java/org/apache/sis/feature/CharacteristicTypeMapTest.java?rev=1640009&r1=1640008&r2=1640009&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-feature/src/test/java/org/apache/sis/feature/CharacteristicTypeMapTest.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-feature/src/test/java/org/apache/sis/feature/CharacteristicTypeMapTest.java
[UTF-8] Sun Nov 16 17:04:19 2014
@@ -98,4 +98,15 @@ public final strictfp class Characterist
                 new SimpleEntry<>("units",    units)
             }, characteristics.entrySet().toArray());
     }
+
+    /**
+     * Tests the reconstruction of {@link CharacteristicTypeMap} after serialization.
+     */
+    @Test
+    public void testSerialization() {
+        final DefaultAttributeType<Float> temperature  = temperature();
+        final DefaultAttributeType<Float> unserialized = assertSerializedEquals(temperature);
+        assertNotSame(temperature, unserialized);
+        assertSame(temperature.characteristics(), unserialized.characteristics());
+    }
 }

Modified: sis/branches/JDK8/core/sis-feature/src/test/java/org/apache/sis/test/suite/FeatureTestSuite.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-feature/src/test/java/org/apache/sis/test/suite/FeatureTestSuite.java?rev=1640009&r1=1640008&r2=1640009&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-feature/src/test/java/org/apache/sis/test/suite/FeatureTestSuite.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-feature/src/test/java/org/apache/sis/test/suite/FeatureTestSuite.java
[UTF-8] Sun Nov 16 17:04:19 2014
@@ -32,6 +32,7 @@ import org.junit.BeforeClass;
 @Suite.SuiteClasses({
     org.apache.sis.feature.DefaultAttributeTypeTest.class,
     org.apache.sis.feature.CharacteristicTypeMapTest.class,
+    org.apache.sis.feature.CharacteristicMapTest.class,
     org.apache.sis.feature.DefaultFeatureTypeTest.class,
     org.apache.sis.feature.PropertySingletonTest.class,
     org.apache.sis.feature.SingletonAttributeTest.class,

Modified: sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.java?rev=1640009&r1=1640008&r2=1640009&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.java
[UTF-8] Sun Nov 16 17:04:19 2014
@@ -81,6 +81,11 @@ public final class Errors extends Indexe
         public static final short CanNotAddToExclusiveSet_2 = 0;
 
         /**
+         * Can not assign “{1}” to “{0}”.
+         */
+        public static final short CanNotAssign_2 = 167;
+
+        /**
          * Can not compute the derivative.
          */
         public static final short CanNotComputeDerivative = 1;

Modified: sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.properties
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.properties?rev=1640009&r1=1640008&r2=1640009&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.properties
[ISO-8859-1] (original)
+++ sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.properties
[ISO-8859-1] Sun Nov 16 17:04:19 2014
@@ -27,6 +27,7 @@
 AbstractType_1                    = Type \u2018{0}\u2019 is abstract.
 AmbiguousName_3                   = Name \u201c{2}\u201d is ambiguous because it can be understood
as either \u201c{0}\u201d or \u201c{1}\u201d.
 CanNotAddToExclusiveSet_2         = No element can be added to this set because properties
\u2018{0}\u2019 and \u2018{1}\u2019 are mutually exclusive.
+CanNotAssign_2                    = Can not assign \u201c{1}\u201d to \u201c{0}\u201d.
 CanNotConcatenateTransforms_2     = Can not concatenate transforms \u201c{0}\u201d and \u201c{1}\u201d.
 CanNotConnectTo_1                 = Can not connect to \u201c{0}\u201d.
 CanNotConvertFromType_2           = Can not convert from type \u2018{0}\u2019 to type \u2018{1}\u2019.

Modified: sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors_fr.properties
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors_fr.properties?rev=1640009&r1=1640008&r2=1640009&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors_fr.properties
[ISO-8859-1] (original)
+++ sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors_fr.properties
[ISO-8859-1] Sun Nov 16 17:04:19 2014
@@ -17,6 +17,7 @@
 AbstractType_1                    = Le type \u2018{0}\u2019 est abstrait.
 AmbiguousName_3                   = Le nom \u00ab\u202f{2}\u202f\u00bb est ambigu\u00eb car
il peut \u00eatre interpr\u00e9t\u00e9 comme \u00ab\u202f{0}\u202f\u00bb ou \u00ab\u202f{1}\u202f\u00bb.
 CanNotAddToExclusiveSet_2         = Aucun \u00e9l\u00e9ment ne peut \u00eatre ajout\u00e9
\u00e0 cet ensemble car les propri\u00e9t\u00e9s \u2018{0}\u2019 et \u2018{1}\u2019 sont mutuellement
exclusives.
+CanNotAssign_2                    = Ne peut pas assigner \u00ab\u202f{1}\u202f\u00bb \u00e0
\u00ab\u202f{0}\u202f\u00bb.
 CanNotConcatenateTransforms_2     = Les transformations \u00ab\u202f{0}\u202f\u00bb et \u00ab\u202f{1}\u202f\u00bb
ne peuvent pas \u00eatre combin\u00e9es.
 CanNotConnectTo_1                 = Ne peut pas se connecter \u00e0 \u00ab\u202f{0}\u202f\u00bb.
 CanNotConvertFromType_2           = Ne peut pas convertir du type \u2018{0}\u2019 vers le
type \u2018{1}\u2019.



Mime
View raw message