sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1609863 [2/2] - in /sis/branches/JDK7: ./ core/sis-feature/src/main/java/org/apache/sis/feature/ core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/ core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/ core/sis-...
Date Fri, 11 Jul 2014 22:58:30 GMT
Modified: sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/iso/Names.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/iso/Names.java?rev=1609863&r1=1609862&r2=1609863&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/iso/Names.java [UTF-8]
(original)
+++ sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/iso/Names.java [UTF-8]
Fri Jul 11 22:58:29 2014
@@ -17,6 +17,7 @@
 package org.apache.sis.util.iso;
 
 import java.util.Collections;
+import org.opengis.util.TypeName;
 import org.opengis.util.LocalName;
 import org.opengis.util.GenericName;
 import org.opengis.util.NameSpace;
@@ -70,6 +71,13 @@ import static org.apache.sis.util.Argume
  * @since   0.5
  * @version 0.5
  * @module
+ *
+ * @see DefaultNameFactory
+ * @see DefaultNameSpace
+ * @see DefaultScopedName
+ * @see DefaultLocalName
+ * @see DefaultTypeName
+ * @see DefaultMemberName
  */
 public final class Names extends Static {
     /**
@@ -100,12 +108,8 @@ public final class Names extends Static 
      * Those character sequences are taken verbatim; they are <em>not</em> parsed
into their components.
      *
      * <div class="note"><b>Note:</b> it is possible to split the {@code
namespace} and {@code localPart}
-     * strings into smaller name components. If such finer grain control is desired, one
can use
-     * {@link DefaultNameFactory} instead of this {@code Names} class.</div>
-     *
-     * <div class="note"><b>Performance note:</b> this method is okay for
<em>casual</em> use. If many names need
-     * to be created in the same namespace, then {@link DefaultNameFactory#createLocalName(NameSpace,
CharSequence)}
-     * is more efficient since it allows to create the {@code NameSpace} object only once.</div>
+     * strings into smaller name components (e.g. namespaces contained in other namespaces).
If such finer
+     * grain control is desired, one can use {@link DefaultNameFactory} instead of this {@code
Names} class.</div>
      *
      * The following table shows where the strings given in argument will go:
      *
@@ -117,7 +121,7 @@ public final class Names extends Static 
      * </table></blockquote>
      *
      * <div class="note"><b>Example:</b>
-     * for a name created by {@code create("http://www.opengis.net/gml/srs/epsg.xml", "#",
"4326")}:
+     * for a name created by {@code createLocalName("http://www.opengis.net/gml/srs/epsg.xml",
"#", "4326")}:
      * <blockquote><table class="compact" summary="Examples of return values for
a name built by this method.">
      *   <tr><td>• <code>name.{@linkplain DefaultLocalName#toString()
toString()}</code></td>
      *       <td>returns the {@code "4326"} string.</td></tr>
@@ -129,6 +133,10 @@ public final class Names extends Static 
      *       <td>returns the {@code "{http://www.opengis.net/gml/srs/epsg.xml}4326"}
string.</td></tr>
      * </table></blockquote></div>
      *
+     * <div class="note"><b>Performance note:</b> this method is okay for
<em>casual</em> use. If many names need
+     * to be created in the same namespace, then {@link DefaultNameFactory#createLocalName(NameSpace,
CharSequence)}
+     * is more efficient since it allows to create the {@code NameSpace} object only once.</div>
+     *
      * @param  namespace The namespace, or {@code null} for the global namespace.
      * @param  separator The separator between the namespace and the local part.
      * @param  localPart The name which is locale in the given namespace.
@@ -141,6 +149,29 @@ public final class Names extends Static 
     }
 
     /**
+     * Creates a type name which is local in the given namespace.
+     * The character sequences can be either {@link String} or {@link InternationalString}
instances.
+     * Those character sequences are taken verbatim; they are <em>not</em> parsed
into their components.
+     *
+     * <div class="note"><b>Example:</b> {@code createTypeName("gco", ":",
"Integer")} returns a name
+     * which can be used for representing the type of {@code <gco:Integer>} elements
in XML files.</div>
+     *
+     * <div class="note"><b>Performance note:</b> this method is okay for
<em>casual</em> use. If many names need
+     * to be created in the same namespace, then {@link DefaultNameFactory#createTypeName(NameSpace,
CharSequence)}
+     * is more efficient since it allows to create the {@code NameSpace} object only once.</div>
+     *
+     * @param  namespace The namespace, or {@code null} for the global namespace.
+     * @param  separator The separator between the namespace and the local part.
+     * @param  localPart The name which is locale in the given namespace.
+     * @return A local name in the given namespace.
+     */
+    public static TypeName createTypeName(final CharSequence namespace, final String separator,
final CharSequence localPart) {
+        ensureNonNull("localPart", localPart);
+        ensureNonNull("separator", separator);
+        return DefaultFactories.NAMES.createTypeName(createNameSpace(namespace, separator),
localPart);
+    }
+
+    /**
      * Formats the given name in <cite>expanded form</cite> close to the Java
Content Repository (JCR) definition.
      * The expanded form is defined as below:
      *

Modified: sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/iso/package-info.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/iso/package-info.java?rev=1609863&r1=1609862&r2=1609863&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/iso/package-info.java
[UTF-8] (original)
+++ sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/iso/package-info.java
[UTF-8] Fri Jul 11 22:58:29 2014
@@ -38,6 +38,13 @@
  *       <li>{@link org.apache.sis.util.iso.DefaultScopedName} for a composite of a
<cite>head</cite> name and a <cite>tail</cite> name.</li>
  *     </ul>
  *   </li>
+ *   <li>Implementations of {@link org.opengis.util.Record} and related classes:
+ *     <ul>
+ *       <li>{@link org.apache.sis.util.iso.DefaultRecord}       for a list of logically
related elements as (<var>name</var>, <var>value</var>) pairs.</li>
+ *       <li>{@link org.apache.sis.util.iso.DefaultRecordType}   for definition of
the type of a {@code Record}.</li>
+ *       <li>{@link org.apache.sis.util.iso.DefaultRecordSchema} for a collection of
{@code RecordType}s in a given namespace.</li>
+ *     </ul>
+ *   </li>
  *   <li>Static utility methods:
  *     <ul>
  *       <li>{@link org.apache.sis.util.iso.Types} for working with UML identifiers
and description of GeoAPI types.</li>

Modified: sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.java?rev=1609863&r1=1609862&r2=1609863&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.java
[UTF-8] (original)
+++ sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.java
[UTF-8] Fri Jul 11 22:58:29 2014
@@ -373,6 +373,11 @@ public final class Errors extends Indexe
         public static final short InconsistentAttribute_2 = 47;
 
         /**
+         * Expected “{0}” namespace for “{1}”.
+         */
+        public static final short InconsistentNamespace_2 = 162;
+
+        /**
          * Inconsistent table columns.
          */
         public static final short InconsistentTableColumns = 48;
@@ -453,6 +458,11 @@ public final class Errors extends Indexe
         public static final short MissingAuthority_1 = 135;
 
         /**
+         * “{0}” has no namespace.
+         */
+        public static final short MissingNamespace_1 = 163;
+
+        /**
          * This operation requires the “{0}” module.
          */
         public static final short MissingRequiredModule_1 = 61;
@@ -668,6 +678,11 @@ public final class Errors extends Indexe
         public static final short PropertyNotFound_2 = 71;
 
         /**
+         * Record “{1}” is already defined in schema “{0}”.
+         */
+        public static final short RecordAlreadyDefined_2 = 161;
+
+        /**
          * Recursive call while creating an object for the “{0}” key.
          */
         public static final short RecursiveCreateCallForKey_1 = 99;

Modified: sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.properties
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.properties?rev=1609863&r1=1609862&r2=1609863&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.properties
[ISO-8859-1] (original)
+++ sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.properties
[ISO-8859-1] Fri Jul 11 22:58:29 2014
@@ -84,6 +84,7 @@ IncompatiblePropertyValue_1       = Prop
 IncompatibleUnit_1                = Unit \u201c{0}\u201d is incompatible with current value.
 IncompatibleUnits_2               = Units \u201c{0}\u201d and \u201c{1}\u201d are incompatible.
 InconsistentAttribute_2           = Value \u201c{1}\u201d of attribute \u2018{0}\u2019 is
inconsistent with other attributes.
+InconsistentNamespace_2           = Expected \u201c{0}\u201d namespace for \u201c{1}\u201d.
 InconsistentTableColumns          = Inconsistent table columns.
 IdentifierAlreadyBound_1          = Identifier \u201c{0}\u201d is already associated to another
object.
 IndexOutOfBounds_1                = Index {0} is out of bounds.
@@ -101,6 +102,7 @@ MismatchedParameterDescriptor_1   = Mism
 MismatchedPropertyType_1          = Mismatched type for \u201c{0}\u201d property.
 MismatchedValueClass_3            = Class of \u201c{0}\u201d values is \u2018{2}\u2019, but
the requested type is \u2018{1}\u2019.
 MissingAuthority_1                = No authority was specified for code \u201c{0}\u201d.
The expected syntax is \u201cAUTHORITY:CODE\u201d.
+MissingNamespace_1                = \u201c{0}\u201d has no namespace.
 MissingRequiredModule_1           = This operation requires the \u201c{0}\u201d module.
 MissingSchemeInURI                = Missing scheme in URI.
 MissingValueForOption_1           = Missing value for \u201c{0}\u201d option.
@@ -145,9 +147,10 @@ OddArrayLength_1                  = Arra
 PropertyAlreadyExists_2           = Property \u201c{1}\u201d is already exists in \u201c{0}\u201d.
 ParameterNotFound_2               = No parameter named \u201c{1}\u201d has been found in
\u201c{0}\u201d.
 PropertyNotFound_2                = No property named \u201c{1}\u201d has been found in \u201c{0}\u201d.
-SingularMatrix                    = Matrix is singular.
+RecordAlreadyDefined_2            = Record \u201c{1}\u201d is already defined in schema \u201c{0}\u201d.
 RecursiveCreateCallForKey_1       = Recursive call while creating an object for the \u201c{0}\u201d
key.
 RequireDecimalSeparator           = A decimal separator is required.
+SingularMatrix                    = Matrix is singular.
 StalledThread_1                   = Thread \u201c{0}\u201d seems stalled.
 StreamIsForwardOnly_1             = Can not move backward in the \u201c{0}\u201d stream.
 TooFewArguments_2                 = Expected at least {0} argument{0,choice,1#|2#s}, but
got {1}.

Modified: sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors_fr.properties
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors_fr.properties?rev=1609863&r1=1609862&r2=1609863&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors_fr.properties
[ISO-8859-1] (original)
+++ sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors_fr.properties
[ISO-8859-1] Fri Jul 11 22:58:29 2014
@@ -74,6 +74,7 @@ IncompatiblePropertyValue_1       = La v
 IncompatibleUnit_1                = L\u2019unit\u00e9 \u00ab\u202f{0}\u202f\u00bb n\u2019est
pas compatible avec la valeur actuelle.
 IncompatibleUnits_2               = Les unit\u00e9s \u00ab\u202f{0}\u202f\u00bb et \u00ab\u202f{1}\u202f\u00bb
ne sont pas compatibles.
 InconsistentAttribute_2           = La valeur \u00ab\u202f{1}\u202f\u00bb de l\u2019attribut
\u2018{0}\u2019 n\u2019est pas coh\u00e9rente avec celles des autres attributs.
+InconsistentNamespace_2           = L\u2019espace de nom \u201c{0}\u201d \u00e9tait attendu
pour \u201c{1}\u201d.
 InconsistentTableColumns          = Les colonnes des tables ne sont pas coh\u00e9rentes.
 IdentifierAlreadyBound_1          = L\u2019identifiant \u00ab\u202f{0}\u202f\u00bb est d\u00e9j\u00e0
associ\u00e9 \u00e0 un autre objet.
 IndexOutOfBounds_1                = L\u2019index {0} est en dehors des limites permises.
@@ -91,6 +92,7 @@ MismatchedParameterDescriptor_1   = Le d
 MismatchedPropertyType_1          = Le type de la propri\u00e9t\u00e9 \u00ab\u202f{0}\u202f\u00bb
ne correspond pas.
 MismatchedValueClass_3            = Les valeurs de \u00ab\u202f{0}\u202f\u00bb sont de la
classe \u2018{2}\u2019, alors que le type demand\u00e9 \u00e9tait \u2018{1}\u2019.
 MissingAuthority_1                = Aucune autorit\u00e9 n\u2019a \u00e9t\u00e9 sp\u00e9cifi\u00e9e
pour le code \u00ab\u202f{0}\u202f\u00bb. Le format attendu est \u00ab\u202fAUTORIT\u00c9:CODE\u202f\u00bb.
+MissingNamespace_1                = \u201c{0}\u201d est d\u00e9fini sans espace de noms.
 MissingRequiredModule_1           = Cette op\u00e9ration requiert le module \u00ab\u202f{0}\u202f\u00bb.
 MissingSchemeInURI                = Il manque le sch\u00e9ma d\u2019URI.
 MissingValueForOption_1           = Aucune valeur n\u2019a \u00e9t\u00e9 d\u00e9finie pour
l\u2019option \u00ab\u202f{0}\u202f\u00bb.
@@ -134,6 +136,7 @@ OddArrayLength_1                  = La l
 PropertyAlreadyExists_2           = La propri\u00e9t\u00e9 \u00ab\u202f{1}\u202f\u00bb existe
d\u00e9j\u00e0 dans \u00ab\u202f{0}\u202f\u00bb.
 ParameterNotFound_2               = Aucun param\u00e8tre nomm\u00e9 \u00ab\u202f{1}\u202f\u00bb
n\u2019a \u00e9t\u00e9 trouv\u00e9 dans \u00ab\u202f{0}\u202f\u00bb.
 PropertyNotFound_2                = Aucune propri\u00e9t\u00e9 nomm\u00e9e \u00ab\u202f{1}\u202f\u00bb
n\u2019a \u00e9t\u00e9 trouv\u00e9e dans \u00ab\u202f{0}\u202f\u00bb.
+RecordAlreadyDefined_2            = L\u2019enregistrement \u00ab\u202f{1}\u202f\u00bb est
d\u00e9j\u00e0 d\u00e9finit dans le sch\u00e9ma \u00ab\u202f{0}\u202f\u00bb.
 RecursiveCreateCallForKey_1       = Appel r\u00e9cursif lors de la cr\u00e9ation d\u2019un
objet pour la cl\u00e9 \u00ab\u202f{0}\u202f\u00bb.
 RequireDecimalSeparator           = Un s\u00e9parateur d\u00e9cimal est requis.
 SingularMatrix                    = La matrice est singuli\u00e8re.

Modified: sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/resources/Messages.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/resources/Messages.java?rev=1609863&r1=1609862&r2=1609863&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/resources/Messages.java
[UTF-8] (original)
+++ sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/resources/Messages.java
[UTF-8] Fri Jul 11 22:58:29 2014
@@ -76,6 +76,11 @@ public final class Messages extends Inde
         public static final short IgnoredPropertiesAfterFirst_1 = 6;
 
         /**
+         * Ignored property associated to ‘{0}’.
+         */
+        public static final short IgnoredPropertyAssociatedTo_1 = 7;
+
+        /**
          * Text were discarded for some locales.
          */
         public static final short LocalesDiscarded = 3;

Modified: sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/resources/Messages.properties
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/resources/Messages.properties?rev=1609863&r1=1609862&r2=1609863&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/resources/Messages.properties
[ISO-8859-1] (original)
+++ sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/resources/Messages.properties
[ISO-8859-1] Fri Jul 11 22:58:29 2014
@@ -18,6 +18,7 @@ AlreadyRegistered_2             = {0} \u
 ChangedContainerCapacity_2      = Changed the container capacity from {0} to {1} elements.
 DiscardedExclusiveProperty_2    = Property \u201c{0}\u201d has been discarded in favor of
\u201c{1}\u201d, because those two properties are mutually exclusive.
 IgnoredPropertiesAfterFirst_1   = Ignored properties after the first occurrence of \u2018{0}\u2019.
+IgnoredPropertyAssociatedTo_1   = Ignored property associated to \u2018{0}\u2019.
 PropertyHiddenBy_2              = Property \u201c{0}\u201d is hidden by \u201c{1}\u201d.
 LocalesDiscarded                = Text were discarded for some locales.
 UnparsableValueStoredAsText_2   = Can not parse \u201c{1}\u201d as an instance of \u2018{0}\u2019.
The value is stored as plain text instead, but will be ignored by some processing.

Modified: sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/resources/Messages_fr.properties
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/resources/Messages_fr.properties?rev=1609863&r1=1609862&r2=1609863&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/resources/Messages_fr.properties
[ISO-8859-1] (original)
+++ sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/resources/Messages_fr.properties
[ISO-8859-1] Fri Jul 11 22:58:29 2014
@@ -18,6 +18,7 @@ AlreadyRegistered_2             = Le {0}
 ChangedContainerCapacity_2      = Changement de la capacit\u00e9 du conteneur de {0} vers
{1} \u00e9l\u00e9ments.
 DiscardedExclusiveProperty_2    = La propri\u00e9t\u00e9 \u00ab\u202f{0}\u202f\u00bb a \u00e9t\u00e9
\u00e9cart\u00e9e en faveur de \u00ab\u202f{1}\u202f\u00bb, parce que ces deux propri\u00e9t\u00e9s
sont mutuellement exclusives.
 IgnoredPropertiesAfterFirst_1   = Des propri\u00e9t\u00e9s ont \u00e9t\u00e9 ignor\u00e9es
apr\u00e8s la premi\u00e8re occurrence de \u2018{0}\u2019.
+IgnoredPropertyAssociatedTo_1   = Une propri\u00e9t\u00e9 associ\u00e9e \u00e0 \u2018{0}\u2019
a \u00e9t\u00e9 ignor\u00e9e.
 PropertyHiddenBy_2              = La propri\u00e9t\u00e9 \u00ab\u202f{0}\u202f\u00bb est
masqu\u00e9e par \u00ab\u202f{1}\u202f\u00bb.
 LocalesDiscarded                = Des textes ont \u00e9t\u00e9 ignor\u00e9s pour certaines
langues.
 UnparsableValueStoredAsText_2   = La valeur \u00ab\u202f{1}\u202f\u00bb ne peut pas \u00eatre
interpr\u00e9t\u00e9e comme une instance de \u2018{0}\u2019. Elle est donc m\u00e9moris\u00e9e
sous sa forme textuelle, mais sera ignor\u00e9e par certains traitements.

Modified: sis/branches/JDK7/core/sis-utility/src/test/java/org/apache/sis/internal/util/CollectionsExtTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-utility/src/test/java/org/apache/sis/internal/util/CollectionsExtTest.java?rev=1609863&r1=1609862&r2=1609863&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-utility/src/test/java/org/apache/sis/internal/util/CollectionsExtTest.java
[UTF-8] (original)
+++ sis/branches/JDK7/core/sis-utility/src/test/java/org/apache/sis/internal/util/CollectionsExtTest.java
[UTF-8] Fri Jul 11 22:58:29 2014
@@ -26,6 +26,7 @@ import java.util.EnumSet;
 import java.util.HashSet;
 import java.util.Collection;
 import java.util.Collections;
+import java.util.Iterator;
 import java.util.Locale;
 import org.apache.sis.util.collection.CodeListSet;
 import org.apache.sis.util.ObjectConverters;
@@ -43,7 +44,7 @@ import org.apache.sis.internal.jdk8.Func
  *
  * @author  Martin Desruisseaux (Geomatys)
  * @since   0.3
- * @version 0.4
+ * @version 0.5
  * @module
  */
 public final strictfp class CollectionsExtTest extends TestCase {
@@ -140,4 +141,16 @@ public final strictfp class CollectionsE
             assertMapEquals(expected, CollectionsExt.toCaseInsensitiveNameMap(elements, nameFunction,
Locale.ROOT));
         }
     }
+
+    /**
+     * Tests {@link CollectionsExt#identityEquals(Iterator, Iterator)}.
+     */
+    @Test
+    public void testIdentityEquals() {
+        final List<String> c1 = Arrays.asList("A", "B", "C");
+        final List<String> c2 = Arrays.asList("A", "B");
+        assertFalse(CollectionsExt.identityEquals(c1.iterator(), c2.iterator()));
+        assertFalse(CollectionsExt.identityEquals(c2.iterator(), c1.iterator()));
+        assertTrue(CollectionsExt.identityEquals(c1.iterator(), Arrays.asList("A", "B", "C").iterator()));
+    }
 }

Modified: sis/branches/JDK7/core/sis-utility/src/test/java/org/apache/sis/test/suite/UtilityTestSuite.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-utility/src/test/java/org/apache/sis/test/suite/UtilityTestSuite.java?rev=1609863&r1=1609862&r2=1609863&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-utility/src/test/java/org/apache/sis/test/suite/UtilityTestSuite.java
[UTF-8] (original)
+++ sis/branches/JDK7/core/sis-utility/src/test/java/org/apache/sis/test/suite/UtilityTestSuite.java
[UTF-8] Fri Jul 11 22:58:29 2014
@@ -26,7 +26,7 @@ import org.junit.BeforeClass;
  *
  * @author  Martin Desruisseaux (Geomatys)
  * @since   0.3
- * @version 0.4
+ * @version 0.5
  * @module
  */
 @Suite.SuiteClasses({
@@ -87,6 +87,9 @@ import org.junit.BeforeClass;
     org.apache.sis.util.iso.DefaultNameFactoryTest.class,
     org.apache.sis.util.iso.NamesTest.class,
     org.apache.sis.internal.simple.SimpleReferenceIdentifierTest.class,
+    org.apache.sis.util.iso.DefaultRecordTypeTest.class,
+    org.apache.sis.util.iso.DefaultRecordSchemaTest.class,
+    org.apache.sis.util.iso.DefaultRecordTest.class,
 
     // Measurements and formatting.
     org.apache.sis.measure.SexagesimalConverterTest.class,

Modified: sis/branches/JDK7/core/sis-utility/src/test/java/org/apache/sis/util/iso/TypesTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-utility/src/test/java/org/apache/sis/util/iso/TypesTest.java?rev=1609863&r1=1609862&r2=1609863&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-utility/src/test/java/org/apache/sis/util/iso/TypesTest.java
[UTF-8] (original)
+++ sis/branches/JDK7/core/sis-utility/src/test/java/org/apache/sis/util/iso/TypesTest.java
[UTF-8] Fri Jul 11 22:58:29 2014
@@ -16,10 +16,8 @@
  */
 package org.apache.sis.util.iso;
 
-import java.util.Set;
 import java.util.Map;
 import java.util.Arrays;
-import java.util.HashSet;
 import java.util.HashMap;
 import java.util.TreeMap;
 import java.util.Locale;
@@ -211,10 +209,9 @@ public final strictfp class TypesTest ex
      */
     @Test
     public void testGetCodeValues() {
-        final Set<OnLineFunction> expected = new HashSet<>(Arrays.asList(
-                OnLineFunction.INFORMATION, OnLineFunction.SEARCH, OnLineFunction.ORDER,
-                OnLineFunction.DOWNLOAD, OnLineFunction.OFFLINE_ACCESS));
         final OnLineFunction[] actual = Types.getCodeValues(OnLineFunction.class);
-        assertTrue(expected.containsAll(Arrays.asList(actual)));
+        assertTrue(Arrays.asList(actual).containsAll(Arrays.asList(
+                OnLineFunction.INFORMATION, OnLineFunction.SEARCH, OnLineFunction.ORDER,
+                OnLineFunction.DOWNLOAD, OnLineFunction.OFFLINE_ACCESS)));
     }
 }



Mime
View raw message