From 463d79858fe7ad1a00a75402d33e68841d6e3ed2 Mon Sep 17 00:00:00 2001 From: Scott Gray Date: Tue, 4 Dec 2007 10:00:24 +0000 Subject: [PATCH] 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 --- .../testtools/src/org/ofbiz/testtools/SimpleMethodTest.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/framework/testtools/src/org/ofbiz/testtools/SimpleMethodTest.java b/framework/testtools/src/org/ofbiz/testtools/SimpleMethodTest.java index 9265b297a8..7222dd3d0f 100644 --- a/framework/testtools/src/org/ofbiz/testtools/SimpleMethodTest.java +++ b/framework/testtools/src/org/ofbiz/testtools/SimpleMethodTest.java @@ -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);