felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dav...@apache.org
Subject svn commit: r1762405 - /felix/trunk/converter/converter/src/test/java/org/apache/felix/converter/impl/ConverterServiceTest.java
Date Tue, 27 Sep 2016 07:39:11 GMT
Author: davidb
Date: Tue Sep 27 07:39:10 2016
New Revision: 1762405

URL: http://svn.apache.org/viewvc?rev=1762405&view=rev
Log:
Felix Converter - additional unit test

Modified:
    felix/trunk/converter/converter/src/test/java/org/apache/felix/converter/impl/ConverterServiceTest.java

Modified: felix/trunk/converter/converter/src/test/java/org/apache/felix/converter/impl/ConverterServiceTest.java
URL: http://svn.apache.org/viewvc/felix/trunk/converter/converter/src/test/java/org/apache/felix/converter/impl/ConverterServiceTest.java?rev=1762405&r1=1762404&r2=1762405&view=diff
==============================================================================
--- felix/trunk/converter/converter/src/test/java/org/apache/felix/converter/impl/ConverterServiceTest.java
(original)
+++ felix/trunk/converter/converter/src/test/java/org/apache/felix/converter/impl/ConverterServiceTest.java
Tue Sep 27 07:39:10 2016
@@ -526,7 +526,18 @@ public class ConverterServiceTest {
             }
         }
 
-        // TODO convert back
+        System.out.println(m);
+
+        // convert back
+        MyDTO2 dto2 = converter.convert(m).to(MyDTO2.class);
+        assertEquals(dto.longList, dto2.longList);
+
+        // Cannot simply do dto.equals() as the DTOs don't implement that
+        assertEquals(dto.dtoMap.size(), dto2.dtoMap.size());
+        MyDTO3 dto2SubZZZ = dto2.dtoMap.get("zzz");
+        assertEquals(dto2SubZZZ.charSet, new HashSet<Character>(Arrays.asList('f',
'o')));
+        MyDTO3 dto2SubAAA = dto2.dtoMap.get("aaa");
+        assertEquals(dto2SubAAA.charSet, new HashSet<Character>(Arrays.asList('b',
'a', 'r')));
     }
 
     @Test



Mime
View raw message