You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by le...@apache.org on 2007/12/04 11:00:25 UTC

svn commit: r600864 - /ofbiz/trunk/framework/testtools/src/org/ofbiz/testtools/SimpleMethodTest.java

Author: lektran
Date: Tue Dec  4 02:00:24 2007
New Revision: 600864

URL: http://svn.apache.org/viewvc?rev=600864&view=rev
Log:
Running a simple method bombs if you don't pass in a locale.
The other option was to get the default locale if one wasn't passed in when creating the MethodContext but I don't know much about that so I took the easy road :-)
On the bright side another one of the unit tests now passes.

Modified:
    ofbiz/trunk/framework/testtools/src/org/ofbiz/testtools/SimpleMethodTest.java

Modified: ofbiz/trunk/framework/testtools/src/org/ofbiz/testtools/SimpleMethodTest.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/testtools/src/org/ofbiz/testtools/SimpleMethodTest.java?rev=600864&r1=600863&r2=600864&view=diff
==============================================================================
--- ofbiz/trunk/framework/testtools/src/org/ofbiz/testtools/SimpleMethodTest.java (original)
+++ ofbiz/trunk/framework/testtools/src/org/ofbiz/testtools/SimpleMethodTest.java Tue Dec  4 02:00:24 2007
@@ -20,6 +20,7 @@
 
 import java.util.Iterator;
 import java.util.List;
+import java.util.Locale;
 import java.util.Map;
 
 import junit.framework.AssertionFailedError;
@@ -61,7 +62,7 @@
         try {
 
             Map serviceResult = SimpleMethod.runSimpleService(methodLocation, methodName, dispatcher.getDispatchContext(), 
-                    UtilMisc.toMap("test", this, "testResult", result));
+                    UtilMisc.toMap("test", this, "testResult", result, "locale", Locale.getDefault()));
 
             // do something with the errorMessage
             String errorMessage = (String) serviceResult.get(ModelService.ERROR_MESSAGE);