Commits

Anonymous committed 51c7fa7

- fix falling test case due to DispatcherUtil is not initialized in the each individual test case. In Struts2, this initialization is done in StrutsTestCase, WebWorkTestCase does not do that. Now I've added DispatcherUtils initialization to DispatcherUtilsTest, maybe a better place would be WebWorkTestCase

Issue number: WW-1335
Obtained from:
Submitted by:
Reviewed by:

git-svn-id: http://svn.opensymphony.com/svn/webwork/trunk@2671573baa09-0c28-0410-bef9-dab3c582ae83

Comments (0)

Files changed (1)

src/test/com/opensymphony/webwork/dispatcher/DispatcherUtilsTest.java

 
 	public void testDefaultResurceBundlePropertyLoaded() throws Exception {
         Locale.setDefault(Locale.US); // force to US locale as we also have _de and _da properties
+        DispatcherUtils.setInstance(null);
         DispatcherUtils.initialize(new MockServletContext());
 		
 		// some i18n messages from xwork-messages.properties
 		
 		Configuration.set(WebWorkConstants.WEBWORK_I18N_ENCODING, "utf-8");
 		
-		
+		DispatcherUtils.setInstance(null);
+		DispatcherUtils.initialize(new MockServletContext());
 		DispatcherUtils du = DispatcherUtils.getInstance();
 		du.prepare(req, res);
 		
 		req.setContentType("multipart/form-data");
 		Configuration.set(WebWorkConstants.WEBWORK_I18N_ENCODING, "utf-8");
 		
-		
+		DispatcherUtils.setInstance(null);
+		DispatcherUtils.initialize(new MockServletContext());
 		DispatcherUtils du = DispatcherUtils.getInstance();
 		du.prepare(req, res);