sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1647353 - /sis/branches/JDK8/core/sis-utility/src/test/java/org/apache/sis/internal/converter/SystemRegistryTest.java
Date Mon, 22 Dec 2014 17:19:51 GMT
Author: desruisseaux
Date: Mon Dec 22 17:19:51 2014
New Revision: 1647353

URL: http://svn.apache.org/r1647353
Log:
Trivial renaming of test methods, and added one test about the "String to Integer" case.

Modified:
    sis/branches/JDK8/core/sis-utility/src/test/java/org/apache/sis/internal/converter/SystemRegistryTest.java

Modified: sis/branches/JDK8/core/sis-utility/src/test/java/org/apache/sis/internal/converter/SystemRegistryTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-utility/src/test/java/org/apache/sis/internal/converter/SystemRegistryTest.java?rev=1647353&r1=1647352&r2=1647353&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-utility/src/test/java/org/apache/sis/internal/converter/SystemRegistryTest.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-utility/src/test/java/org/apache/sis/internal/converter/SystemRegistryTest.java
[UTF-8] Mon Dec 22 17:19:51 2014
@@ -49,7 +49,22 @@ public final strictfp class SystemRegist
      * Tests the creation of {@link StringConverter}.
      */
     @Test
-    public void testStringFile() {
+    public void testStringAndInteger() {
+        final ObjectConverter<String,Integer> c1 = INSTANCE.findExact(String.class,
Integer.class);
+        final ObjectConverter<Integer,String> c2 = INSTANCE.findExact(Integer.class,
String.class);
+        assertInstanceOf("Integer ← String", StringConverter.Integer.class, c1);
+        assertInstanceOf("String ← Integer", ObjectToString.class, c2);
+        assertSame("inverse()", c2, c1.inverse());
+        assertSame("inverse()", c1, c2.inverse());
+        assertSame(c1, assertSerializedEquals(c1));
+        assertSame(c2, assertSerializedEquals(c2));
+    }
+
+    /**
+     * Tests the creation of {@link StringConverter}.
+     */
+    @Test
+    public void testStringAndFile() {
         final ObjectConverter<String,File> c1 = INSTANCE.findExact(String.class, File.class);
         final ObjectConverter<File,String> c2 = INSTANCE.findExact(File.class, String.class);
         assertInstanceOf("File ← String", StringConverter.File.class, c1);
@@ -64,7 +79,7 @@ public final strictfp class SystemRegist
      * Tests the creation of code list converter.
      */
     @Test
-    public void testStringCodeList() {
+    public void testStringAndCodeList() {
         final ObjectConverter<String, OnLineFunction> c1 = INSTANCE.findExact(String.class,
OnLineFunction.class);
         final ObjectConverter<OnLineFunction, String> c2 = INSTANCE.findExact(OnLineFunction.class,
String.class);
         assertInstanceOf("OnLineFunction ← String", StringConverter.CodeList.class, c1);
@@ -81,7 +96,7 @@ public final strictfp class SystemRegist
      * @since 0.5
      */
     @Test
-    public void testStringEnum() {
+    public void testStringAndEnum() {
         final ObjectConverter<String, ElementType> c1 = INSTANCE.findExact(String.class,
ElementType.class);
         final ObjectConverter<ElementType, String> c2 = INSTANCE.findExact(ElementType.class,
String.class);
         assertInstanceOf("ElementType ← String", StringConverter.Enum.class, c1);
@@ -96,7 +111,7 @@ public final strictfp class SystemRegist
      * Tests the creation of {@link NumberConverter}.
      */
     @Test
-    public void testFloatDouble() {
+    public void testFloatAndDouble() {
         final ObjectConverter<Float,Double> c1 = INSTANCE.findExact(Float.class, Double.class);
         final ObjectConverter<Double,Float> c2 = INSTANCE.findExact(Double.class, Float.class);
         assertInstanceOf("Double ← Float", NumberConverter.class, c1);
@@ -111,7 +126,7 @@ public final strictfp class SystemRegist
      * Tests the creation of {@link DateConverter}.
      */
     @Test
-    public void testDateLong() {
+    public void testDateAndLong() {
         final ObjectConverter<Date,Long> c1 = INSTANCE.findExact(Date.class, Long.class);
         final ObjectConverter<Long,Date> c2 = INSTANCE.findExact(Long.class, Date.class);
         assertInstanceOf("Long ← Date", DateConverter.Long.class, c1);
@@ -127,7 +142,7 @@ public final strictfp class SystemRegist
      * to {@code java.sql.Date}. The inverse converter is an identity converter.
      */
     @Test
-    public void testDateSQL() {
+    public void testDateAndSQL() {
         final ObjectConverter<Date, java.sql.Date> c1 = INSTANCE.findExact(Date.class,
java.sql.Date.class);
         final ObjectConverter<java.sql.Date, Date> c2 = INSTANCE.findExact(java.sql.Date.class,
Date.class);
         assertInstanceOf("sql.Date ← Date", DateConverter.SQL.class, c1);
@@ -142,7 +157,7 @@ public final strictfp class SystemRegist
      * Tests the creation of {@link PathConverter}.
      */
     @Test
-    public void testFileURI() {
+    public void testFileAndURI() {
         final ObjectConverter<File,URI> c1 = INSTANCE.findExact(File.class, URI.class);
         final ObjectConverter<URI,File> c2 = INSTANCE.findExact(URI.class, File.class);
         assertInstanceOf("URI ← File", PathConverter.FileURI.class, c1);



Mime
View raw message