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. git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@600864 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -20,6 +20,7 @@ package org.ofbiz.testtools;
|
||||
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
|
||||
import junit.framework.AssertionFailedError;
|
||||
@@ -61,7 +62,7 @@ public class SimpleMethodTest extends TestCaseBase {
|
||||
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);
|
||||
|
||||
Reference in New Issue
Block a user