svn commit: r923103 - /ofbiz/trunk/framework/base/src/org/ofbiz/base/conversion/test/MiscTests.java

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r923103 - /ofbiz/trunk/framework/base/src/org/ofbiz/base/conversion/test/MiscTests.java

doogie-3
Author: doogie
Date: Mon Mar 15 07:27:33 2010
New Revision: 923103

URL: http://svn.apache.org/viewvc?rev=923103&view=rev
Log:
Test the ability of loadContainedConverters to skip thrown exceptions.
This leaves 2 lines unconvered, and 1 branch.

Modified:
    ofbiz/trunk/framework/base/src/org/ofbiz/base/conversion/test/MiscTests.java

Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/conversion/test/MiscTests.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/conversion/test/MiscTests.java?rev=923103&r1=923102&r2=923103&view=diff
==============================================================================
--- ofbiz/trunk/framework/base/src/org/ofbiz/base/conversion/test/MiscTests.java (original)
+++ ofbiz/trunk/framework/base/src/org/ofbiz/base/conversion/test/MiscTests.java Mon Mar 15 07:27:33 2010
@@ -33,6 +33,7 @@ import javolution.util.FastMap;
 
 import org.ofbiz.base.concurrent.TTLObject;
 import org.ofbiz.base.conversion.Converter;
+import org.ofbiz.base.conversion.ConverterLoader;
 import org.ofbiz.base.conversion.Converters;
 import org.ofbiz.base.conversion.JSONResult;
 import org.ofbiz.base.test.GenericTestCaseBase;
@@ -56,6 +57,16 @@ public class MiscTests extends GenericTe
         assertStaticHelperClass(Converters.class);
     }
 
+    public static class ConverterLoaderImpl implements ConverterLoader {
+        public void loadConverters() {
+            throw new RuntimeException();
+        }
+    }
+
+    public void testLoadContainedConvertersIgnoresException() {
+        Converters.loadContainedConverters(MiscTests.class);
+    }
+
     public void testExtendsImplements() throws Exception {
         List<String> arraysList = Arrays.asList("a", "b", "c");
         assertConversion("", "[\n \"a\",\n \"b\",\n \"c\"\n]", JSONResult.Indenting.class, arraysList, arraysList.getClass());