sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1701413 - in /sis/branches/JDK8: core/sis-metadata/src/test/java/org/apache/sis/metadata/ core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/ core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/citation/ core/sis-metadata/...
Date Sat, 05 Sep 2015 17:34:06 GMT
Author: desruisseaux
Date: Sat Sep  5 17:34:05 2015
New Revision: 1701413

URL: http://svn.apache.org/r1701413
Log:
Test consolidation.

Modified:
    sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/MetadataStandardTest.java
    sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/PropertyAccessorTest.java
    sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/PropertyInformationTest.java
    sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/TreeNodeTest.java
    sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/DefaultIdentifierTest.java
    sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/DefaultMetadataTest.java
    sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/ImmutableIdentifierTest.java
    sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/citation/CitationsTest.java
    sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/identification/DefaultDataIdentificationTest.java
    sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/test/MetadataAssert.java
    sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/xml/NilReasonMarshallingTest.java
    sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/xml/UUIDMarshallingTest.java
    sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/io/wkt/GeodeticObjectParserTest.java
    sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/parameter/ParameterMarshallingTest.java
    sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/parameter/TensorParametersTest.java
    sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/crs/DefaultProjectedCRSTest.java
    sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/DefaultCartesianCSTest.java
    sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/DefaultEllipsoidalCSTest.java
    sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/DefaultOperationMethodTest.java
    sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/test/ReferencingAssert.java
    sis/branches/JDK8/core/sis-referencing/src/test/resources/org/apache/sis/referencing/crs/ProjectedCRS.xml
    sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/simple/CitationConstant.java
    sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/util/MetadataServices.java
    sis/branches/JDK8/profiles/sis-french-profile/src/test/java/org/apache/sis/internal/profile/fra/DataIdentificationTest.java

Modified: sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/MetadataStandardTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/MetadataStandardTest.java?rev=1701413&r1=1701412&r2=1701413&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/MetadataStandardTest.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/MetadataStandardTest.java [UTF-8] Sat Sep  5 17:34:05 2015
@@ -20,7 +20,6 @@ import java.util.Set;
 import java.util.Map;
 import java.util.List;
 import java.util.HashSet;
-import java.util.Collection;
 import org.opengis.metadata.citation.Citation;
 import org.opengis.metadata.quality.Completeness;
 import org.opengis.referencing.IdentifiedObject;
@@ -40,7 +39,7 @@ import org.apache.sis.test.TestCase;
 import org.junit.Test;
 
 import static java.util.Collections.singleton;
-import static org.apache.sis.test.MetadataAssert.*;
+import static org.apache.sis.test.Assert.*;
 import static org.apache.sis.test.TestUtilities.getSingleton;
 
 
@@ -251,9 +250,7 @@ public final strictfp class MetadataStan
          */
         assertEquals("title", "EPSG Geodetic Parameter Dataset", map.get("title").toString());
         assertEquals("title", "EPSG Geodetic Parameter Dataset", map.get("getTitle").toString());
-        final Object identifiers = map.get("identifiers");
-        assertInstanceOf("identifiers", Collection.class, identifiers);
-        assertContainsIdentifierCode("EPSG", (Collection<?>) identifiers);
+        assertEquals("EPSG", PropertyAccessorTest.getSingletonCode(map.get("identifiers")));
     }
 
     /**

Modified: sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/PropertyAccessorTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/PropertyAccessorTest.java?rev=1701413&r1=1701412&r2=1701413&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/PropertyAccessorTest.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/PropertyAccessorTest.java [UTF-8] Sat Sep  5 17:34:05 2015
@@ -63,7 +63,7 @@ import org.apache.sis.test.TestCase;
 import org.junit.Test;
 
 import static java.util.Collections.singleton;
-import static org.apache.sis.test.MetadataAssert.*;
+import static org.opengis.test.Assert.*;
 import static org.apache.sis.test.TestUtilities.getSingleton;
 import static org.apache.sis.metadata.PropertyAccessor.APPEND;
 import static org.apache.sis.metadata.PropertyAccessor.RETURN_NULL;
@@ -294,8 +294,7 @@ public final strictfp class PropertyAcce
 
         // Collection of Identifiers
         final Object identifiers = accessor.get(accessor.indexOf("identifiers", true), instance);
-        assertInstanceOf("identifiers", Collection.class, identifiers);
-        assertContainsIdentifierCode("19111", (Collection<?>) identifiers);
+        assertEquals("19111", getSingletonCode(identifiers));
     }
 
     /**
@@ -457,7 +456,7 @@ public final strictfp class PropertyAcce
         assertEquals("set(…, RETURN_PREVIOUS)", oldTitles, oldValue);
         assertEquals("get(…)",                  newTitles, newValue);
         assertSame  ("alternateTitles",         newValue, instance.getAlternateTitles());
-        assertEquals("title",                   "Ignored title", instance.getTitle().toString());
+        assertTitleEquals("title", "Ignored title", instance);
     }
 
     /**
@@ -526,7 +525,7 @@ public final strictfp class PropertyAcce
         // Check final collection content.
         final List<InternationalString> expected = Arrays.asList(title1, title2);
         assertEquals("alternateTitles", expected, accessor.get(index, instance));
-        assertEquals("title", "Ignored title", instance.getTitle().toString());
+        assertTitleEquals("title", "Ignored title", instance);
     }
 
     /**
@@ -573,17 +572,17 @@ public final strictfp class PropertyAcce
         assertEquals("set(…, APPEND)",  Boolean.TRUE, changed);
         assertEquals("get(…)",          merged, newValue);
         assertSame  ("alternateTitles", newValue, instance.getAlternateTitles());
-        assertEquals("title", "Added title", instance.getTitle().toString());
+        assertTitleEquals("title", "Added title", instance);
 
         // Test setting again the title to the same value.
         titleChanged = accessor.set(titleIndex, instance, "Added title", APPEND);
         assertEquals("set(…, APPEND)", Boolean.FALSE, titleChanged);
-        assertEquals("title", "Added title", instance.getTitle().toString());
+        assertTitleEquals("title", "Added title", instance);
 
         // Test setting the title to a different value.
         titleChanged = accessor.set(titleIndex, instance, "Different title", APPEND);
         assertNull("set(…, APPEND)", titleChanged); // Operation shall be refused.
-        assertEquals("title", "Added title", instance.getTitle().toString());
+        assertTitleEquals("title", "Added title", instance);
     }
 
     /**
@@ -609,7 +608,7 @@ public final strictfp class PropertyAcce
         assertInstanceOf("identifiers", Collection.class, target);
         assertNotSame("Distinct objects shall have distinct collections.", source, target);
         assertEquals ("The two collections shall have the same content.",  source, target);
-        assertContainsIdentifierCode("EPSG", (Collection<?>) target);
+        assertEquals ("EPSG", getSingletonCode(target));
 
         // Set the identifiers to null, which should clear the collection.
         assertEquals("Expected the previous value.", source, accessor.set(index, citation, null, RETURN_PREVIOUS));
@@ -649,4 +648,18 @@ public final strictfp class PropertyAcce
         final PropertyAccessor accessor = createPropertyAccessor();
         assertEquals("PropertyAccessor[14 getters (+1 ext.) & 15 setters in DefaultCitation:Citation from “ISO 19115”]", accessor.toString());
     }
+
+    /**
+     * Returns the code of the singleton identifier found in the given collection.
+     * This method verifies that the object is of the expected type.
+     *
+     * @param identifiers A singleton {@code Collection<Identifier>}.
+     * @return {@link Identifier#getCode()}.
+     */
+    static String getSingletonCode(final Object identifiers) {
+        assertInstanceOf("identifiers", Collection.class, identifiers);
+        final Object identifier = getSingleton((Collection<?>) identifiers);
+        assertInstanceOf("identifier", Identifier.class, identifier);
+        return ((Identifier) identifier).getCode();
+    }
 }

Modified: sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/PropertyInformationTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/PropertyInformationTest.java?rev=1701413&r1=1701412&r2=1701413&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/PropertyInformationTest.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/PropertyInformationTest.java [UTF-8] Sat Sep  5 17:34:05 2015
@@ -68,7 +68,7 @@ public final strictfp class PropertyInfo
      */
     private static void assertParentIsCitation(final ExtendedElementInformation information) {
         assertInstanceOf("Specific to SIS implementation.", Identifier.class, information);
-        assertEquals("ISO 19115",   ((Identifier) information).getAuthority().getTitle().toString());
+        assertTitleEquals("authority", "ISO 19115", ((Identifier) information).getAuthority());
         assertEquals("CI_Citation", getSingleton(information.getParentEntity()));
     }
 
@@ -138,6 +138,7 @@ public final strictfp class PropertyInfo
      * @throws NoSuchMethodException Should never happen.
      */
     @Test
+    @SuppressWarnings("UnnecessaryBoxing")
     public void testGetDomainValue() throws NoSuchMethodException {
         final ExtendedElementInformation information = new PropertyInformation<>(HardCodedCitations.ISO_19115,
                 "maxRelativeHumidity", EnvironmentalRecord.class.getMethod("getMaxRelativeHumidity"), Double.class,

Modified: sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/TreeNodeTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/TreeNodeTest.java?rev=1701413&r1=1701412&r2=1701413&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/TreeNodeTest.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/TreeNodeTest.java [UTF-8] Sat Sep  5 17:34:05 2015
@@ -39,7 +39,7 @@ import org.apache.sis.test.DependsOn;
 import org.apache.sis.test.TestCase;
 import org.junit.Test;
 
-import static org.junit.Assert.*;
+import static org.apache.sis.test.MetadataAssert.*;
 import static java.util.Collections.singleton;
 
 
@@ -230,8 +230,8 @@ public final strictfp class TreeNodeTest
     @Test
     @DependsOnMethod("testGetIdentifier")
     public void testGetIndex() {
-        final Integer ZERO = Integer.valueOf(0);
-        final Integer ONE  = Integer.valueOf(1);
+        final Integer ZERO = 0;
+        final Integer ONE  = 1;
         final DefaultCitation citation = metadataWithHierarchy();
         assertColumnContentEquals(create(citation, ValueExistencePolicy.NON_EMPTY), TableColumn.INDEX,
             null,           // CI_Citation
@@ -339,7 +339,7 @@ public final strictfp class TreeNodeTest
         child = node.newChild();
         child.setValue(TableColumn.IDENTIFIER, "title");
         child.setValue(TableColumn.VALUE, "A new title");
-        assertEquals("A new title", citation.getTitle().toString());
+        assertTitleEquals("citation", "A new title", citation);
         assertSame(citation.getTitle(), child.getValue(TableColumn.VALUE));
         /*
          * Try adding a new element in a collection.

Modified: sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/DefaultIdentifierTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/DefaultIdentifierTest.java?rev=1701413&r1=1701412&r2=1701413&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/DefaultIdentifierTest.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/DefaultIdentifierTest.java [UTF-8] Sat Sep  5 17:34:05 2015
@@ -84,8 +84,8 @@ public final strictfp class DefaultIdent
     @Test
     public void testUnmarshall() throws JAXBException {
         final DefaultIdentifier identifier = unmarshal(DefaultIdentifier.class, XML);
-        assertNull  (        identifier.getVersion());
-        assertEquals("4326", identifier.getCode());
-        assertEquals("EPSG", identifier.getAuthority().getTitle().toString());
+        assertNull       ("identifier",        identifier.getVersion());
+        assertTitleEquals("authority", "EPSG", identifier.getAuthority());
+        assertEquals     ("code",      "4326", identifier.getCode());
     }
 }

Modified: sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/DefaultMetadataTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/DefaultMetadataTest.java?rev=1701413&r1=1701412&r2=1701413&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/DefaultMetadataTest.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/DefaultMetadataTest.java [UTF-8] Sat Sep  5 17:34:05 2015
@@ -220,7 +220,7 @@ public final strictfp class DefaultMetad
         assertEquals("parentIdentifier", "ParentID", metadata.getParentIdentifier());
 
         DefaultCitation c = (DefaultCitation) metadata.getParentMetadata();
-        assertEquals("parentMetadata", "ParentID", c.getTitle().toString());
+        assertTitleEquals("parentMetadata", "ParentID", c);
         c.setTitle(new SimpleInternationalString("New parent"));
         assertEquals("parentIdentifier", "New parent", metadata.getParentIdentifier());
     }
@@ -328,7 +328,7 @@ public final strictfp class DefaultMetad
         assertEquals("metadataStandardName",    name,    metadata.getMetadataStandardName());
         assertEquals("metadataStandardVersion", version, metadata.getMetadataStandardVersion());
         final Citation standard = getSingleton(metadata.getMetadataStandards());
-        assertEquals(name,    standard.getTitle()  .toString());
+        assertTitleEquals("standard", name, standard);
         assertEquals(version, standard.getEdition().toString());
     }
 

Modified: sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/ImmutableIdentifierTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/ImmutableIdentifierTest.java?rev=1701413&r1=1701412&r2=1701413&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/ImmutableIdentifierTest.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/ImmutableIdentifierTest.java [UTF-8] Sat Sep  5 17:34:05 2015
@@ -73,14 +73,14 @@ public final strictfp class ImmutableIde
         final ImmutableIdentifier identifier = new ImmutableIdentifier(properties);
         Validators.validate(identifier);
 
-        assertEquals(CODE_KEY,            "This is a code",         identifier.getCode());
-        assertNull  (CODESPACE_KEY,                                 identifier.getCodeSpace());
-        assertEquals(AUTHORITY_KEY,       "This is an authority",   identifier.getAuthority().getTitle().toString());
-        assertEquals(VERSION_KEY,         "This is a version",      identifier.getVersion());
-        assertEquals("description",       "There is a description", identifier.getDescription().toString(Locale.ENGLISH));
-        assertEquals("description_fr",    "Voici une description",  identifier.getDescription().toString(Locale.FRENCH));
-        assertEquals("description_fr_CA", "Pareil",                 identifier.getDescription().toString(Locale.CANADA_FRENCH));
-        assertEquals("description_fr_BE", "Voici une description",  identifier.getDescription().toString(new Locale("fr", "BE")));
+        assertEquals     (CODE_KEY,            "This is a code",         identifier.getCode());
+        assertNull       (CODESPACE_KEY,                                 identifier.getCodeSpace());
+        assertTitleEquals(AUTHORITY_KEY,       "This is an authority",   identifier.getAuthority());
+        assertEquals     (VERSION_KEY,         "This is a version",      identifier.getVersion());
+        assertEquals     ("description",       "There is a description", identifier.getDescription().toString(Locale.ENGLISH));
+        assertEquals     ("description_fr",    "Voici une description",  identifier.getDescription().toString(Locale.FRENCH));
+        assertEquals     ("description_fr_CA", "Pareil",                 identifier.getDescription().toString(Locale.CANADA_FRENCH));
+        assertEquals     ("description_fr_BE", "Voici une description",  identifier.getDescription().toString(new Locale("fr", "BE")));
     }
 
     /**
@@ -94,13 +94,13 @@ public final strictfp class ImmutableIde
         final ImmutableIdentifier identifier = new ImmutableIdentifier(properties);
         Validators.validate(identifier);
 
-        assertEquals(CODE_KEY,            "This is a code",          identifier.getCode());
-        assertNull  (CODESPACE_KEY,                                  identifier.getCodeSpace());
-        assertEquals(AUTHORITY_KEY,       "This is an authority",    identifier.getAuthority().getTitle().toString());
-        assertEquals(VERSION_KEY,         "This is a version",       identifier.getVersion());
-        assertEquals("description",       "Overwritten description", identifier.getDescription().toString(Locale.ENGLISH));
-        assertEquals("description_fr",    "Voici une description",   identifier.getDescription().toString(Locale.FRENCH));
-        assertEquals("description_fr_CA", "Pareil",                  identifier.getDescription().toString(Locale.CANADA_FRENCH));
+        assertEquals     (CODE_KEY,            "This is a code",          identifier.getCode());
+        assertNull       (CODESPACE_KEY,                                  identifier.getCodeSpace());
+        assertTitleEquals(AUTHORITY_KEY,       "This is an authority",    identifier.getAuthority());
+        assertEquals     (VERSION_KEY,         "This is a version",       identifier.getVersion());
+        assertEquals     ("description",       "Overwritten description", identifier.getDescription().toString(Locale.ENGLISH));
+        assertEquals     ("description_fr",    "Voici une description",   identifier.getDescription().toString(Locale.FRENCH));
+        assertEquals     ("description_fr_CA", "Pareil",                  identifier.getDescription().toString(Locale.CANADA_FRENCH));
     }
 
     /**
@@ -114,13 +114,13 @@ public final strictfp class ImmutableIde
         final ImmutableIdentifier identifier = new ImmutableIdentifier(properties);
         Validators.validate(identifier);
 
-        assertEquals(CODE_KEY,            "This is a code",         identifier.getCode());
-        assertNull  (CODESPACE_KEY,                                 identifier.getCodeSpace());
-        assertEquals(AUTHORITY_KEY,       "An other authority",     identifier.getAuthority().getTitle().toString());
-        assertEquals(VERSION_KEY,         "This is a version",      identifier.getVersion());
-        assertEquals("description",       "There is a description", identifier.getDescription().toString(Locale.ENGLISH));
-        assertEquals("description_fr",    "Voici une description",  identifier.getDescription().toString(Locale.FRENCH));
-        assertEquals("description_fr_CA", "Pareil",                 identifier.getDescription().toString(Locale.CANADA_FRENCH));
+        assertEquals     (CODE_KEY,            "This is a code",         identifier.getCode());
+        assertNull       (CODESPACE_KEY,                                 identifier.getCodeSpace());
+        assertTitleEquals(AUTHORITY_KEY,       "An other authority",     identifier.getAuthority());
+        assertEquals     (VERSION_KEY,         "This is a version",      identifier.getVersion());
+        assertEquals     ("description",       "There is a description", identifier.getDescription().toString(Locale.ENGLISH));
+        assertEquals     ("description_fr",    "Voici une description",  identifier.getDescription().toString(Locale.FRENCH));
+        assertEquals     ("description_fr_CA", "Pareil",                 identifier.getDescription().toString(Locale.CANADA_FRENCH));
     }
 
     /**

Modified: sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/citation/CitationsTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/citation/CitationsTest.java?rev=1701413&r1=1701412&r2=1701413&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/citation/CitationsTest.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/citation/CitationsTest.java [UTF-8] Sat Sep  5 17:34:05 2015
@@ -157,19 +157,17 @@ public final strictfp class CitationsTes
      */
     @Test
     public void testGetTitles() {
-        assertEquals("Apache Spatial Information System",    SIS    .getTitle().toString(Locale.US));
-        assertEquals("Identifier in OGC namespace",          OGC    .getTitle().toString(Locale.US));
-        assertEquals("EPSG Geodetic Parameter Dataset",      EPSG   .getTitle().toString(Locale.US));
-        assertEquals("International Standard Book Number",   ISBN   .getTitle().toString(Locale.US));
-        assertEquals("International Standard Serial Number", ISSN   .getTitle().toString(Locale.US));
-        assertEquals("GeoTIFF",                              GEOTIFF.getTitle().toString(Locale.US));
-        assertEquals("NetCDF",                               NETCDF .getTitle().toString(Locale.US));
-        assertEquals("Proj.4",                               PROJ4  .getTitle().toString(Locale.US));
-        assertEquals("S-57",                                 S57    .getTitle().toString(Locale.US));
-        assertEquals("Geographic Information — Metadata Part 1: Fundamentals",
-                ISO_19115.get(0).getTitle().toString(Locale.US));
-        assertEquals("Geographic Information — Metadata Part 2: Extensions for imagery and gridded data",
-                ISO_19115.get(1).getTitle().toString(Locale.US));
+        assertTitleEquals("SIS",     "Apache Spatial Information System",    SIS);
+        assertTitleEquals("OGC",     "Identifier in OGC namespace",          OGC);
+        assertTitleEquals("EPSG",    "EPSG Geodetic Parameter Dataset",      EPSG);
+        assertTitleEquals("ISBN",    "International Standard Book Number",   ISBN);
+        assertTitleEquals("ISSN",    "International Standard Serial Number", ISSN);
+        assertTitleEquals("GEOTIFF", "GeoTIFF",                              GEOTIFF);
+        assertTitleEquals("NETCDF",  "NetCDF",                               NETCDF);
+        assertTitleEquals("PROJ4",   "Proj.4",                               PROJ4);
+        assertTitleEquals("S57",     "S-57",                                 S57);
+        assertTitleEquals("ISO_19115", "Geographic Information — Metadata Part 1: Fundamentals", ISO_19115.get(0));
+        assertTitleEquals("ISO_19115", "Geographic Information — Metadata Part 2: Extensions for imagery and gridded data", ISO_19115.get(1));
     }
 
     /**

Modified: sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/identification/DefaultDataIdentificationTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/identification/DefaultDataIdentificationTest.java?rev=1701413&r1=1701412&r2=1701413&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/identification/DefaultDataIdentificationTest.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/identification/DefaultDataIdentificationTest.java [UTF-8] Sat Sep  5 17:34:05 2015
@@ -174,7 +174,7 @@ public final strictfp class DefaultDataI
         final DefaultDataIdentification info = create();
         final Map<String,Object> map = info.asMap();
         assertEquals("abstract", "NCEP SST Global 5.0 x 2.5 degree model data", map.get("abstract").toString());
-        assertEquals("title", "Sea Surface Temperature Analysis Model", ((Citation) map.get("citation")).getTitle().toString());
+        assertTitleEquals("title", "Sea Surface Temperature Analysis Model", (Citation) map.get("citation"));
         assertEquals("spatialRepresentationType", singleton(SpatialRepresentationType.GRID), map.get("spatialRepresentationType"));
         assertArrayEquals("language",     LOCALES, ((Collection<?>) map.get("language")).toArray());
         assertArrayEquals("languages",    LOCALES, ((Collection<?>) map.get("languages")).toArray());

Modified: sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/test/MetadataAssert.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/test/MetadataAssert.java?rev=1701413&r1=1701412&r2=1701413&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/test/MetadataAssert.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/test/MetadataAssert.java [UTF-8] Sat Sep  5 17:34:05 2015
@@ -16,8 +16,9 @@
  */
 package org.apache.sis.test;
 
-import java.util.Collection;
-import org.opengis.metadata.Identifier;
+import java.util.Locale;
+import org.opengis.util.InternationalString;
+import org.opengis.metadata.citation.Citation;
 import org.opengis.referencing.IdentifiedObject;
 import org.apache.sis.io.wkt.Symbols;
 import org.apache.sis.io.wkt.WKTFormat;
@@ -53,25 +54,19 @@ public strictfp class MetadataAssert ext
     }
 
     /**
-     * Asserts that the given collection contains exactly one identifier with the given
-     * {@linkplain Identifier#getCode() code}. The {@linkplain Identifier#getCodeSpace()
-     * code space} and authority are ignored.
+     * Asserts that the English title of the given citation is equals to the expected string.
      *
-     * @param expected The expected identifier code (typically {@code "ISO"} or {@code "EPSG"}).
-     * @param identifiers The collection to validate. Should be a collection of {@link Identifier}.
+     * @param message  The message to report in case of test failure.
+     * @param expected The expected English title.
+     * @param citation The citation to test.
      *
-     * @since 0.5
+     * @since 0.6
      */
-    public static void assertContainsIdentifierCode(final String expected, final Collection<?> identifiers) {
-        assertNotNull("identifiers", identifiers);
-        int count = 0;
-        for (final Object id : identifiers) {
-            assertInstanceOf("identifier", Identifier.class, id);
-            if (((Identifier) id).getCode().equals(expected)) {
-                count++;
-            }
-        }
-        assertEquals("Unexpected amount of identifiers.", 1, count);
+    public static void assertTitleEquals(final String message, final String expected, final Citation citation) {
+        assertNotNull(message, citation);
+        final InternationalString title = citation.getTitle();
+        assertNotNull(message, title);
+        assertEquals(message, expected, title.toString(Locale.US));
     }
 
     /**

Modified: sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/xml/NilReasonMarshallingTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/xml/NilReasonMarshallingTest.java?rev=1701413&r1=1701412&r2=1701413&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/xml/NilReasonMarshallingTest.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/xml/NilReasonMarshallingTest.java [UTF-8] Sat Sep  5 17:34:05 2015
@@ -57,7 +57,7 @@ public final strictfp class NilReasonMar
                 "</gmd:CI_Citation>";
 
         final Citation citation = (Citation) XML.unmarshal(expected);
-        assertEquals("title", "A title", citation.getTitle().toString());
+        assertTitleEquals("citation", "A title", citation);
 
         final Series series = citation.getSeries();
         assertInstanceOf("Should have instantiated a proxy.", NilObject.class, series);
@@ -117,6 +117,7 @@ public final strictfp class NilReasonMar
      */
     @Test
     @DependsOnMethod("testMissing")
+    @SuppressWarnings("UnnecessaryBoxing")
     public void testMissingInteger() throws JAXBException {
         final String expected =
                 "<gmd:MD_Dimension xmlns:gmd=\"" + Namespaces.GMD + '"' +
@@ -187,7 +188,7 @@ public final strictfp class NilReasonMar
                 "</gmd:CI_Citation>";
 
         final Citation citation = (Citation) XML.unmarshal(expected);
-        assertEquals("title", "A title", citation.getTitle().toString());
+        assertTitleEquals("citation", "A title", citation);
 
         final Series series = citation.getSeries();
         assertInstanceOf("Should have instantiated a proxy.", NilObject.class, series);
@@ -222,7 +223,7 @@ public final strictfp class NilReasonMar
                 "</gmd:CI_Citation>";
 
         final Citation citation = (Citation) XML.unmarshal(expected);
-        assertEquals("title", "A title", citation.getTitle().toString());
+        assertTitleEquals("citation", "A title", citation);
 
         final Series series = citation.getSeries();
         assertInstanceOf("Should have instantiated a proxy.", NilObject.class, series);

Modified: sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/xml/UUIDMarshallingTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/xml/UUIDMarshallingTest.java?rev=1701413&r1=1701412&r2=1701413&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/xml/UUIDMarshallingTest.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/xml/UUIDMarshallingTest.java [UTF-8] Sat Sep  5 17:34:05 2015
@@ -122,7 +122,7 @@ public final strictfp class UUIDMarshall
     @Test
     public void testIdentification() throws JAXBException {
         final Citation citation = (Citation) XML.unmarshal(IDENTIFIED_XML);
-        assertEquals("title", "My data", citation.getTitle().toString());
+        assertTitleEquals("Citation", "My data", citation);
         /*
          * Programmatic verification of the Series properties,
          * which is the main object of interest in this test.
@@ -173,7 +173,7 @@ public final strictfp class UUIDMarshall
     @Test
     public void testReference() throws JAXBException {
         final Citation citation = (Citation) XML.unmarshal(REFERENCED_XML_WITH_BODY);
-        assertEquals("Citation.title",  "My data", citation.getTitle().toString());
+        assertTitleEquals("Citation.title", "My data", citation);
         /*
          * Programmatic verification of the Series properties,
          * which is the main object of interest in this test.
@@ -206,7 +206,7 @@ public final strictfp class UUIDMarshall
     @DependsOnMethod("testReference")
     public void testReferenceInEmptyObject() throws JAXBException {
         final Citation citation = (Citation) XML.unmarshal(REFERENCED_XML);
-        assertEquals("Citation.title",  "My data", citation.getTitle().toString());
+        assertTitleEquals("Citation.title", "My data", citation);
         /*
          * Programmatic verification of the Series properties,
          * which is the main object of interest in this test.

Modified: sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/io/wkt/GeodeticObjectParserTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/io/wkt/GeodeticObjectParserTest.java?rev=1701413&r1=1701412&r2=1701413&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/io/wkt/GeodeticObjectParserTest.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/io/wkt/GeodeticObjectParserTest.java [UTF-8] Sat Sep  5 17:34:05 2015
@@ -44,6 +44,7 @@ import org.apache.sis.test.TestCase;
 import org.junit.Test;
 
 import static org.apache.sis.test.ReferencingAssert.*;
+import static org.apache.sis.test.TestUtilities.getSingleton;
 
 
 /**
@@ -104,8 +105,11 @@ public final strictfp class GeodeticObje
     }
 
     /**
-     * Asserts that the name and (optionally) the EPSG identifier of the given object
-     * are equal to the given strings.
+     * Asserts that the name and (optionally) the EPSG identifier of the given object are equal to the given strings.
+     * As a special case if the given EPSG code is 0, then this method verifies that the given object has no identifier.
+     *
+     * <p>This method is similar to {@link #assertEpsgNameAndIdentifierEqual(String, int, IdentifiedObject)} except
+     * that the given name is not necessarily in the EPSG namespace and the EPSG code is allowed to be absent.</p>
      *
      * @param name The expected name.
      * @param epsg The expected EPSG identifier, or {@code 0} if the object shall have no identifier.
@@ -113,7 +117,11 @@ public final strictfp class GeodeticObje
     static void assertNameAndIdentifierEqual(final String name, final int epsg, final IdentifiedObject object) {
         final String message = object.getClass().getSimpleName();
         assertEquals(message, name, object.getName().getCode());
-        assertEpsgIdentifierEquals(epsg, object.getIdentifiers());
+        if (epsg != 0) {
+            assertEquals(message, String.valueOf(epsg), getSingleton(object.getIdentifiers()).getCode());
+        } else {
+            assertTrue(message, object.getIdentifiers().isEmpty());
+        }
     }
 
     /**

Modified: sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/parameter/ParameterMarshallingTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/parameter/ParameterMarshallingTest.java?rev=1701413&r1=1701412&r2=1701413&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/parameter/ParameterMarshallingTest.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/parameter/ParameterMarshallingTest.java [UTF-8] Sat Sep  5 17:34:05 2015
@@ -304,8 +304,7 @@ public final strictfp class ParameterMar
      * @param group The descriptor group to verify.
      */
     private static void verifyDescriptorGroup(final ParameterDescriptorGroup group) {
-        assertEpsgIdentifierEquals(9804, group.getIdentifiers());
-        assertIdentifierEquals("name", "##unrestricted", "EPSG", null, "Mercator (variant A)", group.getName());
+        assertEpsgNameAndIdentifierEqual("Mercator (variant A)", 9804, group);
 
         // Verify the ParameterDescriptors properties.
         final Iterator<GeneralParameterDescriptor> it = group.descriptors().iterator();
@@ -329,8 +328,7 @@ public final strictfp class ParameterMar
     private static void verifyDescriptor(final int code, final String name, final String alias,
             final boolean required, final GeneralParameterDescriptor descriptor)
     {
-        assertEpsgIdentifierEquals(code, descriptor.getIdentifiers());
-        assertIdentifierEquals("name", "##unrestricted", "EPSG", null, name, descriptor.getName());
+        assertEpsgNameAndIdentifierEqual(name, code, descriptor);
         assertAliasTipEquals(alias, descriptor);
         assertEquals("maximumOccurs", 1, descriptor.getMaximumOccurs());
         assertEquals("minimumOccurs", required ? 1 : 0, descriptor.getMinimumOccurs());

Modified: sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/parameter/TensorParametersTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/parameter/TensorParametersTest.java?rev=1701413&r1=1701412&r2=1701413&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/parameter/TensorParametersTest.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/parameter/TensorParametersTest.java [UTF-8] Sat Sep  5 17:34:05 2015
@@ -161,8 +161,15 @@ public strictfp class TensorParametersTe
     {
         assertEquals("name", names[row][column], actual.getName().getCode());
         assertAliasTipEquals((aliases != null) ? aliases[row][column] : null, actual);
-        assertEpsgIdentifierEquals((identifiers != null) ? identifiers[row][column] : 0, actual.getIdentifiers());
         assertEquals("defaultValue", defaultValue, actual.getDefaultValue());
+        if (identifiers != null) {
+            final short expected = identifiers[row][column];
+            if (expected != 0) {
+                assertEpsgIdentifierEquals(String.valueOf(expected), TestUtilities.getSingleton(actual.getIdentifiers()));
+                return;
+            }
+        }
+        assertTrue(actual.getIdentifiers().isEmpty());
     }
 
     /**

Modified: sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/crs/DefaultProjectedCRSTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/crs/DefaultProjectedCRSTest.java?rev=1701413&r1=1701412&r2=1701413&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/crs/DefaultProjectedCRSTest.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/crs/DefaultProjectedCRSTest.java [UTF-8] Sat Sep  5 17:34:05 2015
@@ -23,6 +23,7 @@ import javax.xml.bind.JAXBException;
 import org.opengis.util.FactoryException;
 import org.opengis.referencing.crs.ProjectedCRS;
 import org.opengis.referencing.crs.GeographicCRS;
+import org.opengis.referencing.cs.AxisDirection;
 import org.opengis.test.Validators;
 import org.apache.sis.metadata.iso.citation.Citations;
 import org.apache.sis.referencing.cs.HardCodedCS;
@@ -38,7 +39,7 @@ import org.apache.sis.test.XMLTestCase;
 import org.junit.Test;
 import org.junit.Rule;
 
-import static org.apache.sis.test.MetadataAssert.*;
+import static org.apache.sis.test.ReferencingAssert.*;
 
 
 /**
@@ -407,6 +408,10 @@ public final strictfp class DefaultProje
     public void testXML() throws FactoryException, JAXBException {
         final DefaultProjectedCRS crs = unmarshalFile(DefaultProjectedCRS.class, XML_FILE);
         Validators.validate(crs);
+        assertEpsgNameAndIdentifierEqual("NTF (Paris) / Lambert zone II", 27572, crs);
+        assertEpsgNameAndIdentifierEqual("Lambert zone II", 18082, crs.getConversionFromBase());
         assertEquals("scope", "Large and medium scale topographic mapping and engineering survey.", crs.getScope().toString());
+        assertAxisDirectionsEqual("baseCRS", crs.getBaseCRS().getCoordinateSystem(), AxisDirection.NORTH, AxisDirection.EAST);
+        assertAxisDirectionsEqual("baseCRS", crs.getCoordinateSystem(), AxisDirection.EAST, AxisDirection.NORTH);
     }
 }

Modified: sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/DefaultCartesianCSTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/DefaultCartesianCSTest.java?rev=1701413&r1=1701412&r2=1701413&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/DefaultCartesianCSTest.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/DefaultCartesianCSTest.java [UTF-8] Sat Sep  5 17:34:05 2015
@@ -28,10 +28,10 @@ import org.apache.sis.test.DependsOn;
 import org.apache.sis.test.DependsOnMethod;
 import org.junit.Test;
 
-import static org.apache.sis.test.Assert.*;
 import static java.util.Collections.singletonMap;
 import static org.opengis.referencing.IdentifiedObject.NAME_KEY;
 import static org.apache.sis.test.TestUtilities.getSingleton;
+import static org.apache.sis.test.ReferencingAssert.*;
 
 
 /**
@@ -215,9 +215,11 @@ public final strictfp class DefaultCarte
         final CoordinateSystemAxis N = cs.getAxis(1);
         assertEquals("name",    "Easting, northing (E,N)", cs.getName().getCode());
         assertEquals("remarks", "Used in ProjectedCRS.", cs.getRemarks().toString());
-        assertIdentifierEquals(        "identifier", "EPSG Geodetic Parameter Dataset", "EPSG", null, "4400", getSingleton(cs.getIdentifiers()));
-        assertIdentifierEquals("axis[0].identifier", "EPSG Geodetic Parameter Dataset", "EPSG", null, "1",    getSingleton(E.getIdentifiers()));
-        assertIdentifierEquals("axis[1].identifier", "EPSG Geodetic Parameter Dataset", "EPSG", null, "2",    getSingleton(N.getIdentifiers()));
+        assertEpsgIdentifierEquals("4400", getSingleton(cs.getIdentifiers()));
+        assertEpsgIdentifierEquals("1",    getSingleton(E.getIdentifiers()));
+        assertEpsgIdentifierEquals("2",    getSingleton(N.getIdentifiers()));
+        assertAxisEquals("Easting",  "E", AxisDirection.EAST,  Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY, SI.METRE, null, E);
+        assertAxisEquals("Northing", "N", AxisDirection.NORTH, Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY, SI.METRE, null, N);
         /*
          * Marshal and compare with the original file.
          */

Modified: sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/DefaultEllipsoidalCSTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/DefaultEllipsoidalCSTest.java?rev=1701413&r1=1701412&r2=1701413&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/DefaultEllipsoidalCSTest.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/DefaultEllipsoidalCSTest.java [UTF-8] Sat Sep  5 17:34:05 2015
@@ -19,14 +19,16 @@ package org.apache.sis.referencing.cs;
 import javax.xml.bind.JAXBException;
 import javax.measure.unit.NonSI;
 import org.opengis.test.Validators;
+import org.opengis.referencing.cs.AxisDirection;
 import org.opengis.referencing.cs.CoordinateSystemAxis;
+import org.opengis.referencing.cs.RangeMeaning;
 import org.apache.sis.test.XMLTestCase;
 import org.apache.sis.test.DependsOn;
 import org.apache.sis.test.DependsOnMethod;
 import org.apache.sis.referencing.GeodeticObjectVerifier;
 import org.junit.Test;
 
-import static org.apache.sis.test.Assert.*;
+import static org.apache.sis.test.ReferencingAssert.*;
 import static org.apache.sis.test.TestUtilities.getSingleton;
 
 
@@ -129,11 +131,11 @@ public final strictfp class DefaultEllip
         final CoordinateSystemAxis λ = cs.getAxis(1);
         assertEquals("name",    "Latitude (north), Longitude (east)",     cs.getName().getCode());
         assertEquals("remarks", "Used in two-dimensional GeographicCRS.", cs.getRemarks().toString());
-        assertIdentifierEquals(        "identifier", "EPSG Geodetic Parameter Dataset", "EPSG", null, "6422", getSingleton(cs.getIdentifiers()));
-        assertIdentifierEquals("axis[0].identifier", "EPSG Geodetic Parameter Dataset", "EPSG", null, "106",  getSingleton(φ.getIdentifiers()));
-        assertIdentifierEquals("axis[1].identifier", "EPSG Geodetic Parameter Dataset", "EPSG", null, "107",  getSingleton(λ.getIdentifiers()));
-        assertEquals("axis[0].abbreviation", "φ", φ.getAbbreviation());
-        assertEquals("axis[1].abbreviation", "λ", λ.getAbbreviation());
+        assertAxisEquals("Geodetic latitude",  "φ", AxisDirection.NORTH, -90,  +90, NonSI.DEGREE_ANGLE, RangeMeaning.EXACT, φ);
+        assertAxisEquals("Geodetic longitude", "λ", AxisDirection.EAST, -180, +180, NonSI.DEGREE_ANGLE, RangeMeaning.WRAPAROUND, λ);
+        assertEpsgIdentifierEquals("6422", getSingleton(cs.getIdentifiers()));
+        assertEpsgIdentifierEquals("106",  getSingleton(φ.getIdentifiers()));
+        assertEpsgIdentifierEquals("107",  getSingleton(λ.getIdentifiers()));
         /*
          * Marshal and compare with the original file.
          */

Modified: sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/DefaultOperationMethodTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/DefaultOperationMethodTest.java?rev=1701413&r1=1701412&r2=1701413&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/DefaultOperationMethodTest.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/DefaultOperationMethodTest.java [UTF-8] Sat Sep  5 17:34:05 2015
@@ -88,9 +88,8 @@ public final strictfp class DefaultOpera
     @Test
     public void testConstruction() {
         final OperationMethod method = create("Mercator (variant A)", "9804", "EPSG guidance note #7-2", 2);
-        assertEpsgIdentifierEquals("Mercator (variant A)", method.getName());
-        assertEpsgIdentifierEquals(9804, method.getIdentifiers());
-        assertEquals("formula", "EPSG guidance note #7-2", method.getFormula().getCitation().getTitle().toString());
+        assertEpsgNameAndIdentifierEqual("Mercator (variant A)", 9804, method);
+        assertTitleEquals("formula", "EPSG guidance note #7-2", method.getFormula().getCitation());
         assertEquals("sourceDimensions", Integer.valueOf(2), method.getSourceDimensions());
         assertEquals("targetDimensions", Integer.valueOf(2), method.getTargetDimensions());
     }

Modified: sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/test/ReferencingAssert.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/test/ReferencingAssert.java?rev=1701413&r1=1701412&r2=1701413&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/test/ReferencingAssert.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/test/ReferencingAssert.java [UTF-8] Sat Sep  5 17:34:05 2015
@@ -99,20 +99,20 @@ public strictfp class ReferencingAssert
     }
 
     /**
-     * Asserts that the string representation of the unique identifier in the given collection is equals to the given
-     * EPSG code. As a special case if the given code is 0, then this method verifies that the given object has no
-     * identifier.
+     * Asserts that the given object has the expected name and singleton identifier in the {@code "EPSG"} code space.
+     * No other identifier than the given one is expected. The authority is expected to have the {@code "EPSG"} title,
+     * alternate title or identifier.
      *
-     * @param expected The expected EPSG code, or {@code 0} if we expect no EPSG code.
-     * @param actual   The set of identifiers in which to verify the EPSG code.
+     * @param name       The expected EPSG name.
+     * @param identifier The expected EPSG identifier.
+     * @param object     The object to verify.
+     *
+     * @since 0.6
      */
-    public static void assertEpsgIdentifierEquals(final int expected, final Collection<? extends Identifier> actual) {
-        assertNotNull(actual);
-        if (expected == 0) {
-            assertTrue("identifiers.isEmpty()", actual.isEmpty());
-        } else {
-            assertEpsgIdentifierEquals(String.valueOf(expected), TestUtilities.getSingleton(actual));
-        }
+    public static void assertEpsgNameAndIdentifierEqual(final String name, final int identifier, final IdentifiedObject object) {
+        assertNotNull(object);
+        assertEpsgIdentifierEquals(name, object.getName());
+        assertEpsgIdentifierEquals(String.valueOf(identifier), TestUtilities.getSingleton(object.getIdentifiers()));
     }
 
     /**

Modified: sis/branches/JDK8/core/sis-referencing/src/test/resources/org/apache/sis/referencing/crs/ProjectedCRS.xml
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/test/resources/org/apache/sis/referencing/crs/ProjectedCRS.xml?rev=1701413&r1=1701412&r2=1701413&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/test/resources/org/apache/sis/referencing/crs/ProjectedCRS.xml (original)
+++ sis/branches/JDK8/core/sis-referencing/src/test/resources/org/apache/sis/referencing/crs/ProjectedCRS.xml Sat Sep  5 17:34:05 2015
@@ -27,7 +27,7 @@
   <gml:name codeSpace="EPSG">NTF (Paris) / Lambert zone II</gml:name>
   <gml:scope>Large and medium scale topographic mapping and engineering survey.</gml:scope>
   <gml:conversion>
-    <gml:Conversion gml:id="LambertzoneII">
+    <gml:Conversion gml:id="LambertZoneII">
       <gml:identifier codeSpace="IOGP">urn:ogc:def:coordinateOperation:EPSG::18082</gml:identifier>
       <gml:name codeSpace="EPSG">Lambert zone II</gml:name>
       <gml:scope>Large and medium scale topographic mapping and engineering survey.</gml:scope>

Modified: sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/simple/CitationConstant.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/simple/CitationConstant.java?rev=1701413&r1=1701412&r2=1701413&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/simple/CitationConstant.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/simple/CitationConstant.java [UTF-8] Sat Sep  5 17:34:05 2015
@@ -127,6 +127,7 @@ public class CitationConstant extends Si
      * since that module is required by {@code sis-referencing} which is itself required by
      * almost all other SIS modules.</p>
      */
+    @SuppressWarnings("DoubleCheckedLocking")
     private Citation delegate() {
         Citation c = delegate;
         if (c == null) {

Modified: sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/util/MetadataServices.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/util/MetadataServices.java?rev=1701413&r1=1701412&r2=1701413&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/util/MetadataServices.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/util/MetadataServices.java [UTF-8] Sat Sep  5 17:34:05 2015
@@ -62,6 +62,7 @@ public class MetadataServices extends Op
      *
      * @return The singleton instance.
      */
+    @SuppressWarnings("DoubleCheckedLocking")
     public static MetadataServices getInstance() {
         MetadataServices c = instance;
         if (c == null) {

Modified: sis/branches/JDK8/profiles/sis-french-profile/src/test/java/org/apache/sis/internal/profile/fra/DataIdentificationTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/profiles/sis-french-profile/src/test/java/org/apache/sis/internal/profile/fra/DataIdentificationTest.java?rev=1701413&r1=1701412&r2=1701413&view=diff
==============================================================================
--- sis/branches/JDK8/profiles/sis-french-profile/src/test/java/org/apache/sis/internal/profile/fra/DataIdentificationTest.java [UTF-8] (original)
+++ sis/branches/JDK8/profiles/sis-french-profile/src/test/java/org/apache/sis/internal/profile/fra/DataIdentificationTest.java [UTF-8] Sat Sep  5 17:34:05 2015
@@ -58,8 +58,8 @@ public final strictfp class DataIdentifi
 
         final Object id = XML.unmarshal(xml);
         assertInstanceOf("Expected an AFNOR instance.", DataIdentification.class, id);
-        assertEquals("citation", "Main documentation.", ((DataIdentification) id).getCitation().getTitle().toString());
-        assertEquals("relatedCitations", "Related documentation.", getSingleton(((DataIdentification) id).getRelatedCitations()).getTitle().toString());
+        assertTitleEquals("citation", "Main documentation.", ((DataIdentification) id).getCitation());
+        assertTitleEquals("relatedCitations", "Related documentation.", getSingleton(((DataIdentification) id).getRelatedCitations()));
 
         final String actual = XML.marshal(id);
         assertXmlEquals(xml, actual, "xmlns:*");



Mime
View raw message