Commits

Anonymous committed d850e32

fixing test errors due to conversion api changes

git-svn-id: http://svn.opensymphony.com/svn/xwork/trunk@767e221344d-f017-0410-9bd5-d282ab1896d7

  • Participants
  • Parent commits 0bf9ddb

Comments (0)

Files changed (1)

tiger/src/test/com/opensymphony/xwork/util/AnnotationXWorkConverterTest.java

 import com.opensymphony.xwork.config.ConfigurationManager;
 import junit.framework.TestCase;
 import ognl.OgnlException;
+import ognl.OgnlRuntime;
 
 import java.math.BigDecimal;
 import java.math.BigInteger;
         ognlStackContext.put(XWorkConverter.CONVERSION_PROPERTY_FULLNAME, "bean.birth");
 
         String[] value = new String[]{"invalid date"};
-        assertEquals("Conversion should have failed.", null, converter.convertValue(ognlStackContext, action.getBean(), null, "birth", value, Date.class));
+        assertEquals("Conversion should have failed.", OgnlRuntime.NoConversionPossible, converter.convertValue(ognlStackContext, action.getBean(), null, "birth", value, Date.class));
         stack.pop();
 
         Map conversionErrors = (Map) stack.getContext().get(ActionContext.CONVERSION_ERRORS);
         ognlStackContext.put(XWorkConverter.REPORT_CONVERSION_ERRORS, Boolean.TRUE);
 
         String[] value = new String[]{"invalid date"};
-        assertEquals("Conversion should have failed.", null, converter.convertValue(ognlStackContext, action, null, "date", value, Date.class));
+        assertEquals("Conversion should have failed.", OgnlRuntime.NoConversionPossible, converter.convertValue(ognlStackContext, action, null, "date", value, Date.class));
         stack.pop();
 
         Map conversionErrors = (Map) ognlStackContext.get(ActionContext.CONVERSION_ERRORS);
         ognlStackContext.put(XWorkConverter.REPORT_CONVERSION_ERRORS, Boolean.TRUE);
 
         String[] value = new String[]{"invalid date"};
-        assertEquals("Conversion should have failed.", null, converter.convertValue(ognlStackContext, action, null, "birth", value, Date.class));
+        assertEquals("Conversion should have failed.", OgnlRuntime.NoConversionPossible, converter.convertValue(ognlStackContext, action, null, "birth", value, Date.class));
         stack.pop();
         stack.pop();