Author: desruisseaux
Date: Mon Nov 9 18:42:37 2015
New Revision: 1713508
URL: http://svn.apache.org/viewvc?rev=1713508&view=rev
Log:
Added tests.
Modified:
sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/MolodenskyTransformTest.java
Modified:
sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/MolodenskyTransformTest.java
URL:
http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/MolodenskyTransformTest.java?rev=1713508&r1=1713507&r2=1713508&view=diff
==============================================================================
---
sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/MolodenskyTransformTest.java
[UTF-8] (original)
+++
sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/MolodenskyTransformTest.java
[UTF-8] Mon Nov 9 18:42:37 2015
@@ -225,14 +225,29 @@ public final strictfp class MolodenskyTr
* @throws FactoryException if an error occurred while creating a
transform step.
* @throws TransformException if a transformation failed.
*/
-// @Test
+ @Test
@DependsOnMethod("testProvider")
- @org.junit.Ignore("Need to investigate a 1cm error in height value.")
public void runGeoapiTest() throws FactoryException, TransformException {
new ParameterizedTransformTest(new MathTransformFactoryMock(new
AbridgedMolodensky())).testAbridgedMolodensky();
}
/**
+ * Verifies that creating a Molodensky operation with same source and
target ellipsoid and zero translation
+ * results in an identity affine transform.
+ *
+ * @throws FactoryException if an error occurred while creating a
transform step.
+ */
+ @Test
+ public void testIdentity() throws FactoryException {
+ final Ellipsoid source = CommonCRS.WGS84.ellipsoid();
+ transform = MolodenskyTransform.createGeodeticTransformation(
+ DefaultFactories.forBuildin(MathTransformFactory.class),
source, false, source, false, 0, 0, 0, false);
+ assertInstanceOf("Expected optimized type.", LinearTransform.class,
transform);
+ assertTrue(transform.isIdentity());
+ validate();
+ }
+
+ /**
* Tests the standard Well Known Text (version 1) formatting.
* The result is what we show to users, but may quite different than what
SIS has in memory.
*