sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1660141 - in /sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis: referencing/operation/transform/DefaultMathTransformFactoryTest.java test/suite/ReferencingTestSuite.java
Date Mon, 16 Feb 2015 15:31:05 GMT
Author: desruisseaux
Date: Mon Feb 16 15:31:05 2015
New Revision: 1660141

URL: http://svn.apache.org/r1660141
Log:
Initial draft of DefaultMathTransformFactory tests. Will be completed later.

Added:
    sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/DefaultMathTransformFactoryTest.java
  (with props)
Modified:
    sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/test/suite/ReferencingTestSuite.java

Added: sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/DefaultMathTransformFactoryTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/DefaultMathTransformFactoryTest.java?rev=1660141&view=auto
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/DefaultMathTransformFactoryTest.java
(added)
+++ sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/DefaultMathTransformFactoryTest.java
[UTF-8] Mon Feb 16 15:31:05 2015
@@ -0,0 +1,79 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.sis.referencing.operation.transform;
+
+import org.opengis.util.NoSuchIdentifierException;
+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.*;
+
+
+/**
+ * Tests the registration of operation methods in {@link DefaultMathTransformFactory}.
+ * This test uses the providers registered in all
+ * {@code META-INF/services/org.geotoolkit.referencing.operation.MathTransformProvider}
+ * files found on the classpath.
+ *
+ * @author  Martin Desruisseaux (Geomatys)
+ * @since   0.6
+ * @version 0.6
+ * @module
+ */
+@DependsOn({
+    org.apache.sis.referencing.operation.DefaultOperationMethodTest.class,
+    OperationMethodSetTest.class
+})
+public final strictfp class DefaultMathTransformFactoryTest extends TestCase {
+    /**
+     * The factory being tested.
+     */
+    private static DefaultMathTransformFactory factory;
+
+    /**
+     * Creates the factory to be tested.
+     */
+    @BeforeClass
+    public static void createFactory() {
+        factory = new DefaultMathTransformFactory();
+    }
+
+    /**
+     * Releases the factory used for the tests.
+     */
+    @AfterClass
+    public static void releaseFactory() {
+        factory = null;
+    }
+
+    /**
+     * Tests non-existent operation method.
+     */
+    @Test
+    public void testNonExistentCode() {
+        try {
+            factory.getOperationMethod("EPXX:9624");
+            fail("Expected NoSuchIdentifierException");
+        } catch (NoSuchIdentifierException e) {
+            final String message = e.getLocalizedMessage();
+            assertTrue(message, message.contains("EPXX:9624"));
+        }
+    }
+}

Propchange: sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/DefaultMathTransformFactoryTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/DefaultMathTransformFactoryTest.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain;charset=UTF-8

Modified: sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/test/suite/ReferencingTestSuite.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/test/suite/ReferencingTestSuite.java?rev=1660141&r1=1660140&r2=1660141&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/test/suite/ReferencingTestSuite.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/test/suite/ReferencingTestSuite.java
[UTF-8] Mon Feb 16 15:31:05 2015
@@ -80,6 +80,7 @@ import org.junit.BeforeClass;
     org.apache.sis.referencing.operation.DefaultFormulaTest.class,
     org.apache.sis.referencing.operation.DefaultOperationMethodTest.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.referencing.datum.BursaWolfParametersTest.class,



Mime
View raw message