felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dav...@apache.org
Subject svn commit: r1798601 - /felix/trunk/converter/converter/src/test/java/org/apache/felix/converter/impl/ConverterTest.java
Date Tue, 13 Jun 2017 13:45:22 GMT
Author: davidb
Date: Tue Jun 13 13:45:21 2017
New Revision: 1798601

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

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

Modified: felix/trunk/converter/converter/src/test/java/org/apache/felix/converter/impl/ConverterTest.java
URL: http://svn.apache.org/viewvc/felix/trunk/converter/converter/src/test/java/org/apache/felix/converter/impl/ConverterTest.java?rev=1798601&r1=1798600&r2=1798601&view=diff
==============================================================================
--- felix/trunk/converter/converter/src/test/java/org/apache/felix/converter/impl/ConverterTest.java
(original)
+++ felix/trunk/converter/converter/src/test/java/org/apache/felix/converter/impl/ConverterTest.java
Tue Jun 13 13:45:21 2017
@@ -966,6 +966,21 @@ public class ConverterTest {
         assertEquals("{}", cs);
     }
 
+    @SuppressWarnings("rawtypes")
+    @Test
+    public void testLongArrayToLongCollection() {
+        Long[] la = new Long[] {Long.MIN_VALUE, Long.MAX_VALUE};
+
+        List lc = converter.convert(la).to(List.class);
+
+        assertEquals(la.length, lc.size());
+
+        int i=0;
+        for (Iterator it = lc.iterator(); it.hasNext(); i++) {
+            assertEquals(la[i], it.next());
+        }
+    }
+
     static class MyClass2 {
         private final String value;
         public MyClass2(String v) {



Mime
View raw message