/[Apache-SVN]/jakarta/commons/proper/beanutils/trunk/src/test/org/apache/commons/beanutils/locale/converters/BaseLocaleConverterTestCase.java
ViewVC logotype

Diff of /jakarta/commons/proper/beanutils/trunk/src/test/org/apache/commons/beanutils/locale/converters/BaseLocaleConverterTestCase.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

--- jakarta/commons/proper/beanutils/trunk/src/test/org/apache/commons/beanutils/locale/converters/BaseLocaleConverterTestCase.java	2005/05/28 02:14:35	178854
+++ jakarta/commons/proper/beanutils/trunk/src/test/org/apache/commons/beanutils/locale/converters/BaseLocaleConverterTestCase.java	2005/05/28 02:42:41	178855
@@ -242,13 +242,16 @@ public class BaseLocaleConverterTestCase
         // Convert value with no pattern
         try {
             result = converter.convert("xyz");
+            if (expectedValue == null) {
+                fail("Expected ConversionException if no default value " + msgId);
+            }
         } catch (Exception e) {
-            fail("Invalid conversion " + msgId + " threw " + e);
+            if (expectedValue != null) {
+                fail("Expected default value " + msgId + " threw " + e);
+            }
         }
 
-        if (expectedValue == null) {
-            assertNull("Check invalid conversion is null " + msgId + " result="+result, result);
-        } else {
+        if (expectedValue != null) {
             assertEquals("Check invalid conversion is default " + msgId, expectedValue, result);
         }
 

 

infrastructure at apache.org
ViewVC Help
Powered by ViewVC 1.1.26