Modified: 
sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/parameter/DefaultParameterValueGroupTest.java
URL: 
http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/parameter/DefaultParameterValueGroupTest.java?rev=1667400&r1=1667399&r2=1667400&view=diff
==============================================================================
--- 
sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/parameter/DefaultParameterValueGroupTest.java
 [UTF-8] (original)
+++ 
sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/parameter/DefaultParameterValueGroupTest.java
 [UTF-8] Tue Mar 17 20:57:59 2015
@@ -18,6 +18,7 @@ package org.apache.sis.parameter;
 
 import java.util.List;
 import java.util.Arrays;
+import java.util.ArrayList;
 import org.opengis.parameter.GeneralParameterDescriptor;
 import org.opengis.parameter.GeneralParameterValue;
 import org.opengis.parameter.ParameterDescriptor;
@@ -42,7 +43,7 @@ import static org.opengis.referencing.Id
  *
  * @author  Martin Desruisseaux (IRD, Geomatys)
  * @since   0.4
- * @version 0.5
+ * @version 0.6
  * @module
  */
 @DependsOn({
@@ -144,8 +145,8 @@ public final strictfp class DefaultParam
         assertEquals("parameter(“Mandatory 2”)", 20, 
group.parameter("Mandatory 2").intValue());
         values.clear();
         assertEquals("size", 2, values.size());
-        assertEquals("parameter(“Mandatory 2”)", 10, 
group.parameter("Mandatory 2").intValue());
-        // The above 10 is the default value specified by the descriptor.
+        assertEquals("parameter(“Mandatory 2”)", 
DefaultParameterDescriptorGroupTest.DEFAULT_VALUE,
+                group.parameter("Mandatory 2").getValue());
     }
 
     /**
@@ -165,9 +166,8 @@ public final strictfp class DefaultParam
         } catch (IndexOutOfBoundsException e) {
             assertNotNull(e.getMessage());
         }
-        assertEquals(10, ((ParameterValue<?>) values.get(0)).intValue());
-        assertEquals(10, ((ParameterValue<?>) values.get(1)).intValue());
-        // 10 is the default value specified by the descriptor.
+        assertEquals(DefaultParameterDescriptorGroupTest.DEFAULT_VALUE, 
((ParameterValue<?>) values.get(0)).getValue());
+        assertEquals(DefaultParameterDescriptorGroupTest.DEFAULT_VALUE, 
((ParameterValue<?>) values.get(1)).getValue());
     }
 
     /**
@@ -230,6 +230,64 @@ public final strictfp class DefaultParam
     }
 
     /**
+     * Tests {@code DefaultParameterValueGroup.values().addAll(…)} with 
subgroups.
+     *
+     * @since 0.6
+     */
+    @Test
+    @DependsOnMethod({"testValuesAddAll", "testAddGroup", 
"testEqualsAndHashCode"})
+    public void testValuesAddAllWithSubgroups() {
+        final DefaultParameterDescriptorGroup group, subGroup;
+        final List<GeneralParameterDescriptor> descriptors =
+                new 
ArrayList<GeneralParameterDescriptor>(descriptor.descriptors());
+        subGroup = new DefaultParameterDescriptorGroup(singletonMap(NAME_KEY, 
"theSubGroup"),
+                2, 4, descriptors.toArray(new 
GeneralParameterDescriptor[descriptors.size()]));
+        descriptors.add(subGroup);
+        group = new DefaultParameterDescriptorGroup(singletonMap(NAME_KEY, 
"theGroup"),
+                descriptors.toArray(new 
GeneralParameterDescriptor[descriptors.size()]));
+        /*
+         * Prepare the GeneralParameterValue instances that we are going to 
add in the above group.
+         * We assign arbitrary integer values to each instance if order to be 
able to differentiate
+         * them, but the purpose of this test is not to verify those integer 
values.
+         *
+         * We intentionally:
+         *   - Omit the creation of a mandatory parameter value
+         *   - Create more sub-groups than the minimum required.
+         */
+        final ParameterValue<?>   v2 = (ParameterValue<?>) 
descriptor.descriptor("Mandatory 2").createValue();
+        final ParameterValue<?>   v3 = (ParameterValue<?>) 
descriptor.descriptor( "Optional 3").createValue();
+        final ParameterValueGroup g1 = subGroup.createValue();
+        final ParameterValueGroup g2 = subGroup.createValue();
+        final ParameterValueGroup g3 = subGroup.createValue();
+        v2.setValue(4);
+        v3.setValue(8);
+        g1.parameter("Mandatory 1").setValue(3);
+        g2.parameter( "Optional 4").setValue(7);
+        g3.parameter("Mandatory 2").setValue(5);
+        final List<GeneralParameterValue> expected = new 
ArrayList<GeneralParameterValue>(6);
+        assertTrue(expected.add(v2));
+        assertTrue(expected.add(v3));
+        assertTrue(expected.add(g1));
+        assertTrue(expected.add(g2));
+        assertTrue(expected.add(g3));
+        /*
+         * A newly created group should be initialized with 4 
GeneralParameterValue instances because of
+         * the mandatory ones. After we added our own instances created above, 
the group should contains
+         * 6 instances (one more than what we added) because of the "Mandatory 
1" parameter that we did
+         * not provided. Note that the element order in the 'values' 
collection does not need to be the
+         * order in which we provided our GeneralParameterValue instances.
+         */
+        final List<GeneralParameterValue> values = 
group.createValue().values();
+        assertEquals("Initial size", 4,         values.size());
+        assertTrue  ("List shall be modified",  values.addAll(expected));
+        assertEquals("Size after addAll(…)", 6, values.size());
+        final ParameterValue<?> v1 = (ParameterValue<?>) values.get(0);
+        assertEquals("Default value", 
DefaultParameterDescriptorGroupTest.DEFAULT_VALUE, v1.getValue());
+        assertTrue(expected.add(v1));
+        assertSetEquals(expected, values);
+    }
+
+    /**
      * Tests that attempts to add an invalid parameter cause an {@link 
InvalidParameterNameException} to be thrown.
      */
     @Test

Copied: 
sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/parameter/MapProjectionParametersTest.java
 (from r1667398, 
sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/parameter/MapProjectionParametersTest.java)
URL: 
http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/parameter/MapProjectionParametersTest.java?p2=sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/parameter/MapProjectionParametersTest.java&p1=sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/parameter/MapProjectionParametersTest.java&r1=1667398&r2=1667400&rev=1667400&view=diff
==============================================================================
--- 
sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/parameter/MapProjectionParametersTest.java
 [UTF-8] (original)
+++ 
sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/parameter/MapProjectionParametersTest.java
 [UTF-8] Tue Mar 17 20:57:59 2015
@@ -59,7 +59,7 @@ public final strictfp class MapProjectio
 
     /** Creates a parameter of the given name. */
     private static DefaultParameterDescriptor<?> parameter(final String name) {
-        return new DefaultParameterDescriptor<>(name(name), 1, 1, 
Double.class, null, null, null);
+        return new DefaultParameterDescriptor<Double>(name(name), 1, 1, 
Double.class, null, null, null);
     }
 
     /** Returns properties map for an object of the given name. */

Modified: 
sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/parameter/ParameterBuilderTest.java
URL: 
http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/parameter/ParameterBuilderTest.java?rev=1667400&r1=1667399&r2=1667400&view=diff
==============================================================================
--- 
sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/parameter/ParameterBuilderTest.java
 [UTF-8] (original)
+++ 
sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/parameter/ParameterBuilderTest.java
 [UTF-8] Tue Mar 17 20:57:59 2015
@@ -22,6 +22,7 @@ import javax.measure.unit.NonSI;
 import org.opengis.util.GenericName;
 import org.opengis.parameter.ParameterDescriptor;
 import org.apache.sis.metadata.iso.citation.HardCodedCitations;
+import org.apache.sis.test.DependsOnMethod;
 import org.apache.sis.test.DependsOn;
 import org.apache.sis.test.TestCase;
 import org.junit.Test;
@@ -34,7 +35,7 @@ import static org.junit.Assert.*;
  *
  * @author  Martin Desruisseaux (Geomatys)
  * @since   0.4
- * @version 0.4
+ * @version 0.6
  * @module
  */
 @DependsOn({
@@ -44,9 +45,38 @@ import static org.junit.Assert.*;
 })
 public final strictfp class ParameterBuilderTest extends TestCase {
     /**
+     * Tests various {@code create(…)} methods.
+     */
+    @Test
+    public void testCreate() {
+        final ParameterBuilder builder = new ParameterBuilder();
+        ParameterDescriptor<Double> p = builder.addName("Test 1").create(0, 
SI.METRE);
+        assertEquals("name", "Test 1",    p.getName().getCode());
+        assertEquals("defaultValue", 0.0, p.getDefaultValue(), 0);
+        assertNull  ("minimumValue",      p.getMinimumValue());
+        assertNull  ("maximumValue",      p.getMaximumValue());
+        assertEquals("unit", SI.METRE,    p.getUnit());
+
+        p = builder.addName("Test 2").create(Double.NaN, SI.METRE);
+        assertEquals("name", "Test 2",    p.getName().getCode());
+        assertNull  ("defaultValue",      p.getDefaultValue());
+        assertNull  ("minimumValue",      p.getMinimumValue());
+        assertNull  ("maximumValue",      p.getMaximumValue());
+        assertEquals("unit", SI.METRE,    p.getUnit());
+
+        p = builder.addName("Test 3").createBounded(1, 4, 3, SI.METRE);
+        assertEquals("name", "Test 3",    p.getName().getCode());
+        assertEquals("defaultValue", 3.0, p.getDefaultValue(), 0);
+        assertEquals("minimumValue", 1.0, p.getMinimumValue());
+        assertEquals("maximumValue", 4.0, p.getMaximumValue());
+        assertEquals("unit", SI.METRE,    p.getUnit());
+    }
+
+    /**
      * Tests the "<cite>Mercator (variant A)</cite>" example given in Javadoc.
      */
     @Test
+    @DependsOnMethod("testCreate")
     public void testMercatorProjection() {
         final ParameterBuilder builder = new ParameterBuilder();
         builder.setCodeSpace(HardCodedCitations.OGP, "EPSG").setRequired(true);

Modified: 
sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/parameter/ParametersTest.java
URL: 
http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/parameter/ParametersTest.java?rev=1667400&r1=1667399&r2=1667400&view=diff
==============================================================================
--- 
sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/parameter/ParametersTest.java
 [UTF-8] (original)
+++ 
sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/parameter/ParametersTest.java
 [UTF-8] Tue Mar 17 20:57:59 2015
@@ -16,8 +16,9 @@
  */
 package org.apache.sis.parameter;
 
-import java.util.Collection;
 import java.util.Set;
+import java.util.Collection;
+import java.util.Collections;
 import javax.measure.unit.SI;
 import org.opengis.parameter.ParameterDescriptor;
 import org.opengis.parameter.ParameterDirection;
@@ -42,12 +43,14 @@ import static org.junit.Assert.*;
  *
  * @author  Martin Desruisseaux (Geomatys)
  * @since   0.4
- * @version 0.5
+ * @version 0.6
  * @module
  */
 @DependsOn({
     DefaultParameterDescriptorTest.class,
-    DefaultParameterValueTest.class
+    DefaultParameterDescriptorGroupTest.class,
+    DefaultParameterValueTest.class,
+    DefaultParameterValueGroupTest.class
 })
 public final strictfp class ParametersTest extends TestCase {
     /**
@@ -155,4 +158,38 @@ public final strictfp class ParametersTe
         assertEquals("Optional 4 (second occurrence)", 50,
                 ((ParameterValue<?>) destination.values().get(4)).intValue());
     }
+
+    /**
+     * Tests {@link Parameters#getValue(ParameterDescriptor)} and {@link 
Parameters#intValue(ParameterDescriptor)}.
+     *
+     * @since 0.6
+     */
+    @Test
+    public void testGetIntValue() {
+        final ParameterDescriptor<Integer> descriptor = 
DefaultParameterDescriptorTest.create("My param", 5, 15, 10);
+        final ParameterDescriptor<Integer> incomplete = 
DefaultParameterDescriptorTest.createSimpleOptional("My param", Integer.class);
+        final Parameters group = Parameters.castOrWrap(new 
DefaultParameterDescriptorGroup(Collections.singletonMap(
+                DefaultParameterDescriptorGroup.NAME_KEY, "My group"), 1, 1, 
incomplete).createValue());
+        /*
+         * Test when the ParameterValueGroup is empty. We test both with the 
"incomplete" descriptor,
+         * which contain no default value, and with the complete one, which 
provide a default value.
+         */
+        assertNull("No value and no default value.", 
group.getValue(incomplete));
+        assertEquals("No value, should fallback on default.", 
Integer.valueOf(10), group.getValue(descriptor));
+        try {
+            group.intValue(incomplete);
+            fail("Can not return when there is no value.");
+        } catch (IllegalStateException e) {
+            final String message = e.getMessage();
+            assertTrue(message, message.contains("My param"));
+        }
+        /*
+         * Define a value and test again.
+         */
+        group.parameter("My param").setValue(12);
+        assertEquals(Integer.valueOf(12), group.getValue(incomplete));
+        assertEquals(Integer.valueOf(12), group.getValue(descriptor));
+        assertEquals(12, group.intValue(incomplete));
+        assertEquals(12, group.intValue(descriptor));
+    }
 }

Modified: 
sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/parameter/TensorParametersTest.java
URL: 
http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/parameter/TensorParametersTest.java?rev=1667400&r1=1667399&r2=1667400&view=diff
==============================================================================
--- 
sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/parameter/TensorParametersTest.java
 [UTF-8] (original)
+++ 
sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/parameter/TensorParametersTest.java
 [UTF-8] Tue Mar 17 20:57:59 2015
@@ -161,7 +161,7 @@ public strictfp class TensorParametersTe
     {
         assertEquals("name", names[row][column], actual.getName().getCode());
         assertAliasTipEquals((aliases != null) ? aliases[row][column] : null, 
actual);
-        assertIdentifierEqualsEPSG((identifiers != null) ? 
identifiers[row][column] : 0, actual);
+        assertEpsgIdentifierEquals((identifiers != null) ? 
identifiers[row][column] : 0, actual.getIdentifiers());
         assertEquals("defaultValue", defaultValue, actual.getDefaultValue());
     }
 

Modified: 
sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/parameter/TensorValuesTest.java
URL: 
http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/parameter/TensorValuesTest.java?rev=1667400&r1=1667399&r2=1667400&view=diff
==============================================================================
--- 
sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/parameter/TensorValuesTest.java
 [UTF-8] (original)
+++ 
sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/parameter/TensorValuesTest.java
 [UTF-8] Tue Mar 17 20:57:59 2015
@@ -332,7 +332,7 @@ public final strictfp class TensorValues
     /**
      * Tests {@link TensorParameters#ALPHANUM} formatting.
      * <ul>
-     *   <li>Group name shall be {@code "Affine general parametric 
transformation"}.</li>
+     *   <li>Group name shall be {@code "Affine parametric 
transformation"}.</li>
      *   <li>No {@code "num_row"} or {@code "num_col"} parameters if their 
value is equals to 3.</li>
      *   <li>Parameter names shall be of the form {@code "A0"}.</li>
      *   <li>Identifiers present, but only for A0-A2 and B0-B2.</li>
@@ -348,7 +348,7 @@ public final strictfp class TensorValues
                 singletonMap(TensorValues.NAME_KEY, Affine.NAME), matrix);
         validate(group);
         assertWktEquals(
-                "ParameterGroup[“Affine general parametric transformation”,\n" 
+
+                "ParameterGroup[“Affine parametric transformation”,\n" +
                 "  Parameter[“A2”, 4.0, Id[“EPSG”, 8625]],\n"  +
                 "  Parameter[“B0”, -2.0, Id[“EPSG”, 8639]],\n" +
                 "  Parameter[“C2”, 7.0]]", group);

Modified: 
sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/DefaultOperationMethodTest.java
URL: 
http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/DefaultOperationMethodTest.java?rev=1667400&r1=1667399&r2=1667400&view=diff
==============================================================================
--- 
sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/DefaultOperationMethodTest.java
 [UTF-8] (original)
+++ 
sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/DefaultOperationMethodTest.java
 [UTF-8] Tue Mar 17 20:57:59 2015
@@ -32,8 +32,7 @@ import org.apache.sis.test.DependsOn;
 import org.apache.sis.test.TestCase;
 import org.junit.Test;
 
-import static org.apache.sis.test.MetadataAssert.*;
-import static org.apache.sis.test.TestUtilities.getSingleton;
+import static org.apache.sis.test.ReferencingAssert.*;
 
 
 /**
@@ -87,7 +86,7 @@ public final strictfp class DefaultOpera
     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", 
getSingleton(method.getIdentifiers()));
+        assertEpsgIdentifierEquals(9804, method.getIdentifiers());
         assertEquals("formula", "EPSG guidance note #7-2", 
method.getFormula().getCitation().getTitle().toString());
         assertEquals("sourceDimensions", Integer.valueOf(2), 
method.getSourceDimensions());
         assertEquals("targetDimensions", Integer.valueOf(2), 
method.getTargetDimensions());

Modified: 
sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/DefaultMathTransformFactoryTest.java
URL: 
http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/DefaultMathTransformFactoryTest.java?rev=1667400&r1=1667399&r2=1667400&view=diff
==============================================================================
--- 
sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/DefaultMathTransformFactoryTest.java
 [UTF-8] (original)
+++ 
sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/DefaultMathTransformFactoryTest.java
 [UTF-8] Tue Mar 17 20:57:59 2015
@@ -16,14 +16,22 @@
  */
 package org.apache.sis.referencing.operation.transform;
 
+import java.util.Set;
 import org.opengis.util.NoSuchIdentifierException;
+import org.opengis.referencing.operation.Conversion;
+import org.opengis.referencing.operation.Projection;
+import org.opengis.referencing.operation.SingleOperation;
+import org.opengis.referencing.operation.OperationMethod;
+import org.apache.sis.internal.referencing.provider.Affine;
+import org.apache.sis.internal.util.Constants;
+import org.apache.sis.test.DependsOnMethod;
 import org.apache.sis.test.DependsOn;
 import org.apache.sis.test.TestCase;
 import org.junit.AfterClass;
 import org.junit.BeforeClass;
 import org.junit.Test;
 
-import static org.junit.Assert.*;
+import static org.opengis.test.Assert.*;
 
 
 /**
@@ -37,7 +45,7 @@ import static org.junit.Assert.*;
  * @module
  */
 @DependsOn({
-    org.apache.sis.referencing.operation.DefaultOperationMethodTest.class,
+    org.apache.sis.internal.referencing.provider.AllProvidersTest.class,
     OperationMethodSetTest.class
 })
 public final strictfp class DefaultMathTransformFactoryTest extends TestCase {
@@ -63,9 +71,25 @@ public final strictfp class DefaultMathT
     }
 
     /**
+     * Tests the {@link 
DefaultMathTransformFactory#getOperationMethod(String)} method.
+     *
+     * @throws NoSuchIdentifierException Should never happen.
+     */
+    @Test
+    public void testGetOperationMethod() throws NoSuchIdentifierException {
+        // A conversion which is not a projection.
+        OperationMethod method = factory.getOperationMethod(Constants.AFFINE);
+        assertInstanceOf("Affine", Affine.class, method);
+
+        // Same than above, using EPSG code.
+        assertSame("EPSG:9624", method, 
factory.getOperationMethod("EPSG:9624"));
+    }
+
+    /**
      * Tests non-existent operation method.
      */
     @Test
+    @DependsOnMethod("testGetOperationMethod")
     public void testNonExistentCode() {
         try {
             factory.getOperationMethod("EPXX:9624");
@@ -75,4 +99,29 @@ public final strictfp class DefaultMathT
             assertTrue(message, message.contains("EPXX:9624"));
         }
     }
+
+    /**
+     * Tests the {@link 
DefaultMathTransformFactory#getAvailableMethods(Class)} method.
+     *
+     * @throws NoSuchIdentifierException Should never happen.
+     */
+    @Test
+    @DependsOnMethod("testGetOperationMethod")
+    public void testGetAvailableMethods() throws NoSuchIdentifierException {
+        final Set<OperationMethod> transforms  = 
factory.getAvailableMethods(SingleOperation.class);
+        final Set<OperationMethod> conversions = 
factory.getAvailableMethods(Conversion.class);
+        final Set<OperationMethod> projections = 
factory.getAvailableMethods(Projection.class);
+        /*
+         * Following tests should not cause loading of more classes than 
needed.
+         */
+        assertFalse(transforms .isEmpty());
+        assertFalse(conversions.isEmpty());
+        assertTrue (projections.isEmpty());
+        assertTrue 
(conversions.contains(factory.getOperationMethod(Constants.AFFINE)));
+        /*
+         * Following tests will force instantiation of all remaining 
OperationMethod.
+         */
+        assertTrue("Conversions should be a subset of transforms.",  
transforms .containsAll(conversions));
+        assertTrue("Projections should be a subset of conversions.", 
conversions.containsAll(projections));
+    }
 }

Modified: 
sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/test/ReferencingAssert.java
URL: 
http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/test/ReferencingAssert.java?rev=1667400&r1=1667399&r2=1667400&view=diff
==============================================================================
--- 
sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/test/ReferencingAssert.java
 [UTF-8] (original)
+++ 
sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/test/ReferencingAssert.java
 [UTF-8] Tue Mar 17 20:57:59 2015
@@ -17,7 +17,6 @@
 package org.apache.sis.test;
 
 import java.util.Collection;
-import java.util.Set;
 import java.awt.geom.Rectangle2D;
 import java.awt.geom.RectangularShape;
 import java.awt.geom.AffineTransform;
@@ -34,13 +33,14 @@ import org.opengis.referencing.cs.AxisDi
 import org.opengis.referencing.cs.CoordinateSystemAxis;
 import org.opengis.referencing.cs.RangeMeaning;
 import org.opengis.util.GenericName;
-import org.apache.sis.internal.util.Constants;
 import org.apache.sis.geometry.AbstractEnvelope;
 import org.apache.sis.geometry.GeneralDirectPosition;
+import org.apache.sis.metadata.iso.citation.Citations;
 import org.apache.sis.referencing.IdentifiedObjects;
 import org.apache.sis.util.iso.DefaultNameSpace;
 
 import static java.lang.StrictMath.*;
+import static org.apache.sis.internal.util.Constants.EPSG;
 
 
 /**
@@ -65,20 +65,53 @@ public strictfp class ReferencingAssert
     }
 
     /**
-     * Asserts that the string representation of the unique identifier of the 
given object is equals to the given
+     * Asserts that the given identifier has the expected code and the {@code 
"OGC"} code space.
+     * The authority is expected to be {@link Citations#OGC}. We expect the 
exact same authority
+     * instance because identifiers in OGC namespace are often hard-coded in 
SIS.
+     *
+     * @param expected The expected identifier code.
+     * @param actual   The identifier to verify.
+     *
+     * @since 0.6
+     */
+    public static void assertOgcIdentifierEquals(final String expected, final 
Identifier actual) {
+        assertNotNull(actual);
+        assertSame("Authority", Citations.OGC, actual.getAuthority());
+        Assert.assertIdentifierEquals(null, "OGC", "OGC", null, expected, 
actual);
+    }
+
+    /**
+     * Asserts that the given identifier has the expected code and the {@code 
"EPSG"} code space.
+     * The authority is expected to have the {@code "OGP"} title or alternate 
title.
+     *
+     * @param expected The expected identifier code.
+     * @param actual   The identifier to verify.
+     *
+     * @since 0.5
+     */
+    public static void assertEpsgIdentifierEquals(final String expected, final 
Identifier actual) {
+        assertNotNull(actual);
+        assertEquals("code",       expected, actual.getCode());
+        assertEquals("codeSpace",  EPSG,  actual.getCodeSpace());
+        assertEquals("authority",  "OGP", 
Citations.getIdentifier(actual.getAuthority()));
+        assertEquals("identifier", EPSG + DefaultNameSpace.DEFAULT_SEPARATOR + 
expected,
+                IdentifiedObjects.toString(actual));
+    }
+
+    /**
+     * 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.
      *
-     * @param code   The expected EPSG code, or {@code 0} if we expect no EPSG 
code.
-     * @param object The object for which to test the EPSG code.
+     * @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.
      */
-    public static void assertIdentifierEqualsEPSG(final int code, final 
IdentifiedObject object) {
-        final Set<Identifier> identifiers = object.getIdentifiers();
-        if (code == 0) {
-            assertTrue("identifiers.isEmpty()", identifiers.isEmpty());
+    public static void assertEpsgIdentifierEquals(final int expected, final 
Collection<? extends Identifier> actual) {
+        assertNotNull(actual);
+        if (expected == 0) {
+            assertTrue("identifiers.isEmpty()", actual.isEmpty());
         } else {
-            assertEquals("identifier", Constants.EPSG + 
DefaultNameSpace.DEFAULT_SEPARATOR + code,
-                    
IdentifiedObjects.toString(TestUtilities.getSingleton(identifiers)));
+            assertEpsgIdentifierEquals(String.valueOf(expected), 
TestUtilities.getSingleton(actual));
         }
     }
 

Modified: 
sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/test/suite/ReferencingTestSuite.java
URL: 
http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/test/suite/ReferencingTestSuite.java?rev=1667400&r1=1667399&r2=1667400&view=diff
==============================================================================
--- 
sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/test/suite/ReferencingTestSuite.java
 [UTF-8] (original)
+++ 
sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/test/suite/ReferencingTestSuite.java
 [UTF-8] Tue Mar 17 20:57:59 2015
@@ -78,13 +78,17 @@ import org.junit.BeforeClass;
     org.apache.sis.parameter.MatrixParametersTest.class,
     org.apache.sis.parameter.MatrixParametersAlphaNumTest.class,
     org.apache.sis.parameter.TensorValuesTest.class,
+    org.apache.sis.parameter.MapProjectionParametersTest.class,
 
     org.apache.sis.referencing.operation.DefaultFormulaTest.class,
     org.apache.sis.referencing.operation.DefaultOperationMethodTest.class,
+    org.apache.sis.internal.referencing.provider.AffineTest.class,
+    org.apache.sis.internal.referencing.provider.LongitudeRotationTest.class,
+    org.apache.sis.internal.referencing.provider.MapProjectionTest.class,
+    org.apache.sis.internal.referencing.provider.AllProvidersTest.class,
     
org.apache.sis.referencing.operation.transform.OperationMethodSetTest.class,
     
org.apache.sis.referencing.operation.transform.DefaultMathTransformFactoryTest.class,
     org.apache.sis.internal.referencing.OperationMethodsTest.class,
-    org.apache.sis.internal.referencing.provider.AffineTest.class,
 
     org.apache.sis.referencing.datum.BursaWolfParametersTest.class,
     org.apache.sis.referencing.datum.TimeDependentBWPTest.class,

Modified: 
sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/internal/util/Constants.java
URL: 
http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/internal/util/Constants.java?rev=1667400&r1=1667399&r2=1667400&view=diff
==============================================================================
--- 
sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/internal/util/Constants.java
 [UTF-8] (original)
+++ 
sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/internal/util/Constants.java
 [UTF-8] Tue Mar 17 20:57:59 2015
@@ -74,15 +74,23 @@ public final class Constants extends Sta
     /**
      * Name of the {@value} projection parameter, which is handled specially 
during WKT formatting.
      */
-    public static final String SEMI_MAJOR = "semi_major", SEMI_MINOR = 
"semi_minor";
+    public static final String SEMI_MAJOR = "semi_major",
+                               SEMI_MINOR = "semi_minor";
+
+    /**
+     * The OGC parameter name for the standard parallels.
+     */
+    public static final String STANDARD_PARALLEL_1 = "standard_parallel_1",
+                               STANDARD_PARALLEL_2 = "standard_parallel_2";
 
     /**
      * Name of the {@value} matrix parameters.
      */
-    public static final String NUM_ROW = "num_row", NUM_COL = "num_col";
+    public static final String NUM_ROW = "num_row",
+                               NUM_COL = "num_col";
 
     /**
-     * The OGC name for <cite>Affine general parametric transformation"</cite>.
+     * The OGC name for <cite>"Affine parametric transformation"</cite>.
      *
      * @see org.apache.sis.internal.referencing.provider.Affine#NAME
      */

Modified: 
sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/measure/MeasurementRange.java
URL: 
http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/measure/MeasurementRange.java?rev=1667400&r1=1667399&r2=1667400&view=diff
==============================================================================
--- 
sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/measure/MeasurementRange.java
 [UTF-8] (original)
+++ 
sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/measure/MeasurementRange.java
 [UTF-8] Tue Mar 17 20:57:59 2015
@@ -51,7 +51,7 @@ import org.apache.sis.internal.jdk7.Obje
  *
  * @author  Martin Desruisseaux (IRD)
  * @since   0.3
- * @version 0.5
+ * @version 0.6
  * @module
  *
  * @see RangeFormat
@@ -109,6 +109,22 @@ public class MeasurementRange<E extends
     }
 
     /**
+     * Constructs a range of {@code double} values greater than the given 
value.
+     * The {@code minValue} is often zero for creating a range of strictly 
positive values.
+     * This method may return a shared instance, at implementation choice.
+     *
+     * @param  minValue The minimal value (exclusive), or {@link 
Double#NEGATIVE_INFINITY} if none.
+     * @param  unit The unit of measurement, or {@code null} if unknown.
+     * @return The new range of numeric values greater than the given value.
+     *
+     * @since 0.6
+     */
+    public static MeasurementRange<Double> createGreaterThan(final double 
minValue, final Unit<?> unit) {
+        return unique(new MeasurementRange<Double>(Double.class,
+                valueOf("minValue", minValue, Double.NEGATIVE_INFINITY), 
false, null, false, unit));
+    }
+
+    /**
      * Constructs a range using the smallest type of {@link Number} that can 
hold the given values.
      * This method performs the same work than {@link NumberRange#createBestFit
      * NumberRange.createBestFit(…)} with an additional {@code unit} argument.
@@ -133,7 +149,7 @@ public class MeasurementRange<E extends
         if (type == null) {
             return null;
         }
-        return (MeasurementRange) unique(new MeasurementRange(type,
+        return unique(new MeasurementRange(type,
                 Numbers.cast(minValue, type), isMinIncluded,
                 Numbers.cast(maxValue, type), isMaxIncluded, unit));
     }

Modified: 
sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/util/Static.java
URL: 
http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/util/Static.java?rev=1667400&r1=1667399&r2=1667400&view=diff
==============================================================================
--- 
sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/util/Static.java
 [UTF-8] (original)
+++ 
sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/util/Static.java
 [UTF-8] Tue Mar 17 20:57:59 2015
@@ -71,7 +71,8 @@ package org.apache.sis.util;
  *     <td>Parses axis names and creates transforms between {@link 
org.opengis.referencing.cs.CoordinateSystem}
  *         instances.</td></tr>
  * <tr><td>{@link org.apache.sis.parameter.Parameters}</td>
- *     <td>Creates, searches or modifies {@link 
org.opengis.parameter.ParameterValue} instances.</td></tr>
+ *     <td>Creates, searches or modifies {@link 
org.opengis.parameter.ParameterValue} instances
+ *         in a group of parameters.</td></tr>
  *
  * <tr><th colspan="2" class="hsep">Input / Output (including CRS, XML, 
images)</th></tr>
  * <tr><td>{@link org.apache.sis.io.IO}</td>
@@ -97,7 +98,7 @@ package org.apache.sis.util;
  *     <td>Create {@link ObjectConverter} instances, or collection views using 
object converters.</td></tr>
  * </table>
  *
- * @author Martin Desruisseaux (Geomatys)
+ * @author  Martin Desruisseaux (Geomatys)
  * @since   0.3
  * @version 0.3
  * @module

Modified: 
sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/util/resources/IndexedResourceBundle.java
URL: 
http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/util/resources/IndexedResourceBundle.java?rev=1667400&r1=1667399&r2=1667400&view=diff
==============================================================================
--- 
sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/util/resources/IndexedResourceBundle.java
 [UTF-8] (original)
+++ 
sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/util/resources/IndexedResourceBundle.java
 [UTF-8] Tue Mar 17 20:57:59 2015
@@ -29,6 +29,7 @@ import java.util.NoSuchElementException;
 import java.util.ResourceBundle;
 import java.util.logging.Level;
 import java.util.logging.LogRecord;
+import java.lang.reflect.Modifier;
 import org.opengis.util.CodeList;
 import org.opengis.util.Enumerated;
 import org.opengis.util.InternationalString;
@@ -71,7 +72,7 @@ import org.apache.sis.internal.jdk7.JDK7
  *
  * @author  Martin Desruisseaux (IRD, Geomatys)
  * @since   0.3
- * @version 0.4
+ * @version 0.6
  * @module
  */
 public class IndexedResourceBundle extends ResourceBundle implements Localized 
{
@@ -408,7 +409,7 @@ public class IndexedResourceBundle exten
                 }
                 replacement = message;
             } else if (element instanceof Class<?>) {
-                replacement = Classes.getShortName((Class<?>) element);
+                replacement = Classes.getShortName(getPublicType((Class<?>) 
element));
             } else if (element instanceof Enumerated) {
                 replacement = Types.getCodeTitle((Enumerated) 
element).toString(getLocale());
             }
@@ -425,6 +426,23 @@ public class IndexedResourceBundle exten
     }
 
     /**
+     * If the given class is not public, returns the first public interface or 
the first public super-class.
+     * This is for avoiding confusing the user with private class in message 
like "Value can not be instance
+     * of XYZ". In the worst case (nothing public other than {@code Object}), 
returns {@code Object.class}.
+     */
+    private static Class<?> getPublicType(Class<?> c) {
+        while (!Modifier.isPublic(c.getModifiers())) {
+            for (final Class<?> type : c.getInterfaces()) {
+                if (Modifier.isPublic(type.getModifiers())) {
+                    return type;
+                }
+            }
+            c = c.getSuperclass();
+        }
+        return c;
+    }
+
+    /**
      * Gets a string for the given key and appends "…" to it.
      * This method is typically used for creating menu items.
      *

Modified: 
sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/util/resources/Messages_fr.properties
URL: 
http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/util/resources/Messages_fr.properties?rev=1667400&r1=1667399&r2=1667400&view=diff
==============================================================================
--- 
sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/util/resources/Messages_fr.properties
 [ISO-8859-1] (original)
+++ 
sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/util/resources/Messages_fr.properties
 [ISO-8859-1] Tue Mar 17 20:57:59 2015
@@ -22,5 +22,5 @@ IgnoredPropertiesAfterFirst_1   = Des pr
 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.
-MismatchedEllipsoidAxisLength_3 = Le param\u00e8tre 
\u00ab\u202f{1}\u202f\u00bb aurait pu \u00eatre omis. Mais il lui a 
\u00e9t\u00e9 donn\u00e9 la {2} qui ne correspond pas \u00e0 la d\u00e9finition 
de l'ellipso\u00efde \u00ab\u202f{0}\u202f\u00bb.
+MismatchedEllipsoidAxisLength_3 = Le param\u00e8tre 
\u00ab\u202f{1}\u202f\u00bb aurait pu \u00eatre omis. Mais il lui a 
\u00e9t\u00e9 donn\u00e9 la valeur {2} qui ne correspond pas \u00e0 la 
d\u00e9finition de l'ellipso\u00efde \u00ab\u202f{0}\u202f\u00bb.
 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.

Copied: 
sis/branches/JDK6/core/sis-utility/src/test/java/org/apache/sis/internal/util/LazySetTest.java
 (from r1667398, 
sis/branches/JDK7/core/sis-utility/src/test/java/org/apache/sis/internal/util/LazySetTest.java)
URL: 
http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-utility/src/test/java/org/apache/sis/internal/util/LazySetTest.java?p2=sis/branches/JDK6/core/sis-utility/src/test/java/org/apache/sis/internal/util/LazySetTest.java&p1=sis/branches/JDK7/core/sis-utility/src/test/java/org/apache/sis/internal/util/LazySetTest.java&r1=1667398&r2=1667400&rev=1667400&view=diff
==============================================================================
--- 
sis/branches/JDK7/core/sis-utility/src/test/java/org/apache/sis/internal/util/LazySetTest.java
 [UTF-8] (original)
+++ 
sis/branches/JDK6/core/sis-utility/src/test/java/org/apache/sis/internal/util/LazySetTest.java
 [UTF-8] Tue Mar 17 20:57:59 2015
@@ -43,7 +43,7 @@ public final strictfp class LazySetTest
      * Creates the set to use for testing purpose.
      */
     private static LazySet<String> create() {
-        return new LazySet<>(Arrays.asList(LABELS));
+        return new LazySet<String>(Arrays.asList(LABELS));
     }
 
     /**

Modified: 
sis/branches/JDK6/core/sis-utility/src/test/java/org/apache/sis/test/Assert.java
URL: 
http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-utility/src/test/java/org/apache/sis/test/Assert.java?rev=1667400&r1=1667399&r2=1667400&view=diff
==============================================================================
--- 
sis/branches/JDK6/core/sis-utility/src/test/java/org/apache/sis/test/Assert.java
 [UTF-8] (original)
+++ 
sis/branches/JDK6/core/sis-utility/src/test/java/org/apache/sis/test/Assert.java
 [UTF-8] Tue Mar 17 20:57:59 2015
@@ -18,6 +18,7 @@ package org.apache.sis.test;
 
 import java.util.Set;
 import java.util.Map;
+import java.util.Collection;
 import java.util.Enumeration;
 import java.util.LinkedHashSet;
 import java.util.LinkedHashMap;
@@ -142,13 +143,15 @@ public strictfp class Assert extends org
     }
 
     /**
-     * Asserts that the given set contains the same elements.
+     * Asserts that the given set contains the same elements, ignoring order.
      * In case of failure, this method lists the missing or unexpected 
elements.
      *
+     * <p>The given collections are typically instances of {@link Set}, but 
this is not mandatory.</p>
+     *
      * @param expected The expected set, or {@code null}.
      * @param actual   The actual set, or {@code null}.
      */
-    public static void assertSetEquals(final Set<?> expected, final Set<?> 
actual) {
+    public static void assertSetEquals(final Collection<?> expected, final 
Collection<?> actual) {
         if (expected != null && actual != null && !expected.isEmpty()) {
             final Set<Object> r = new LinkedHashSet<Object>(expected);
             assertTrue("The two sets are disjoint.",                 
r.removeAll(actual));
@@ -157,7 +160,9 @@ public strictfp class Assert extends org
             assertTrue("The two sets are disjoint.",                 
r.removeAll(expected));
             assertTrue("The set contains unexpected elements: " + r, 
r.isEmpty());
         }
-        assertEquals("Set.equals(Object) failed:", expected, actual);
+        if (expected instanceof Set<?> && actual instanceof Set<?>) {
+            assertEquals("Set.equals(Object) failed:", expected, actual);
+        }
     }
 
     /**

Modified: 
sis/branches/JDK6/core/sis-utility/src/test/java/org/apache/sis/test/suite/UtilityTestSuite.java
URL: 
http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-utility/src/test/java/org/apache/sis/test/suite/UtilityTestSuite.java?rev=1667400&r1=1667399&r2=1667400&view=diff
==============================================================================
--- 
sis/branches/JDK6/core/sis-utility/src/test/java/org/apache/sis/test/suite/UtilityTestSuite.java
 [UTF-8] (original)
+++ 
sis/branches/JDK6/core/sis-utility/src/test/java/org/apache/sis/test/suite/UtilityTestSuite.java
 [UTF-8] Tue Mar 17 20:57:59 2015
@@ -26,7 +26,7 @@ import org.junit.BeforeClass;
  *
  * @author  Martin Desruisseaux (Geomatys)
  * @since   0.3
- * @version 0.5
+ * @version 0.6
  * @module
  */
 @Suite.SuiteClasses({
@@ -78,6 +78,7 @@ import org.junit.BeforeClass;
     org.apache.sis.util.collection.CodeListSetTest.class,
     org.apache.sis.internal.util.CollectionsExtTest.class,
     org.apache.sis.internal.util.AbstractMapTest.class,
+    org.apache.sis.internal.util.LazySetTest.class,
 
     // GeoAPI most basic types.
     org.apache.sis.internal.util.DefinitionURITest.class,

Modified: sis/branches/JDK6/ide-project/NetBeans/build.xml
URL: 
http://svn.apache.org/viewvc/sis/branches/JDK6/ide-project/NetBeans/build.xml?rev=1667400&r1=1667399&r2=1667400&view=diff
==============================================================================
--- sis/branches/JDK6/ide-project/NetBeans/build.xml (original)
+++ sis/branches/JDK6/ide-project/NetBeans/build.xml Tue Mar 17 20:57:59 2015
@@ -62,6 +62,13 @@
       </fileset>
     </concat>
 
+    <!-- OperationMethod implementations to be loaded by ServiceLoader. -->
+    <concat 
destfile="${build.classes.dir}/META-INF/services/org.opengis.referencing.operation.OperationMethod"
 encoding="UTF-8" fixlastline="yes">
+      <fileset dir="${project.root}">
+        <include 
name="*/*/src/main/resources/META-INF/services/org.opengis.referencing.operation.OperationMethod"/>
+      </fileset>
+    </concat>
+
     <!-- ObjectConverter implementations to be loaded by ServiceLoader. -->
     <concat 
destfile="${build.classes.dir}/META-INF/services/org.apache.sis.util.ObjectConverter"
 encoding="UTF-8" fixlastline="yes">
       <fileset dir="${project.root}">

Modified: sis/branches/JDK6/src/main/javadoc/stylesheet.css
URL: 
http://svn.apache.org/viewvc/sis/branches/JDK6/src/main/javadoc/stylesheet.css?rev=1667400&r1=1667399&r2=1667400&view=diff
==============================================================================
--- sis/branches/JDK6/src/main/javadoc/stylesheet.css (original)
+++ sis/branches/JDK6/src/main/javadoc/stylesheet.css Tue Mar 17 20:57:59 2015
@@ -187,6 +187,9 @@ ul.verbose li {
   margin-bottom: 6px;
 }
 
+span.deprecated {
+  text-decoration: line-through;
+}
 
 
 


Reply via email to