ofbiz-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From doo...@apache.org
Subject svn commit: r910356 - /ofbiz/trunk/framework/base/src/org/ofbiz/base/conversion/test/DateTimeTests.java
Date Mon, 15 Feb 2010 22:24:55 GMT
Author: doogie
Date: Mon Feb 15 22:24:54 2010
New Revision: 910356

URL: http://svn.apache.org/viewvc?rev=910356&view=rev
Log:
Explicitly test the canConvert method on each converter.

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

Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/conversion/test/DateTimeTests.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/conversion/test/DateTimeTests.java?rev=910356&r1=910355&r2=910356&view=diff
==============================================================================
--- ofbiz/trunk/framework/base/src/org/ofbiz/base/conversion/test/DateTimeTests.java (original)
+++ ofbiz/trunk/framework/base/src/org/ofbiz/base/conversion/test/DateTimeTests.java Mon Feb
15 22:24:54 2010
@@ -30,7 +30,8 @@
     }
 
     public static <S, T> void assertConversion(String label, Converter<S, T>
converter, S source, T target) throws Exception {
-        assertEquals(label, target, converter.convert(source));
+        assertTrue(label + " can convert", converter.canConvert(source.getClass(), target.getClass()));
+        assertEquals(label + " converted", target, converter.convert(source));
     }
 
     public void testDateTimeConverters() throws Exception {



Mime
View raw message