Author: tmjee Date: Mon Oct 2 03:10:07 2006 New Revision: 451943 URL: http://svn.apache.org/viewvc?view=rev&rev=451943 Log: WW-420 - fix failing test cases due to undefined result and result not found following changes made to WW-420 - test should now run ok
Modified: struts/struts2/trunk/core/src/test/java/org/apache/struts2/TestConfigurationProvider.java struts/struts2/trunk/core/src/test/resources/struts.xml Modified: struts/struts2/trunk/core/src/test/java/org/apache/struts2/TestConfigurationProvider.java URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/test/java/org/apache/struts2/TestConfigurationProvider.java?view=diff&rev=451943&r1=451942&r2=451943 ============================================================================== --- struts/struts2/trunk/core/src/test/java/org/apache/struts2/TestConfigurationProvider.java (original) +++ struts/struts2/trunk/core/src/test/java/org/apache/struts2/TestConfigurationProvider.java Mon Oct 2 03:10:07 2006 @@ -35,6 +35,7 @@ import com.opensymphony.xwork2.config.entities.PackageConfig; import com.opensymphony.xwork2.config.entities.ResultConfig; import com.opensymphony.xwork2.interceptor.ParametersInterceptor; +import com.opensymphony.xwork2.mock.MockResult; /** @@ -98,6 +99,8 @@ results = new HashMap(); ActionConfig tokenActionConfig = new ActionConfig(null, TestAction.class, null, results, interceptors); + tokenActionConfig.addResultConfig(new ResultConfig("invalid.token", MockResult.class.getName())); + tokenActionConfig.addResultConfig(new ResultConfig("success", MockResult.class.getName())); defaultPackageConfig.addActionConfig(TOKEN_ACTION_NAME, tokenActionConfig); interceptors = new ArrayList(); @@ -115,6 +118,8 @@ // empty results for token session unit test results = new HashMap(); ActionConfig tokenSessionActionConfig = new ActionConfig(null, TestAction.class, null, results, interceptors); + tokenSessionActionConfig.addResultConfig(new ResultConfig("invalid.token", MockResult.class.getName())); + tokenSessionActionConfig.addResultConfig(new ResultConfig("success", MockResult.class.getName())); defaultPackageConfig.addActionConfig(TOKEN_SESSION_ACTION_NAME, tokenSessionActionConfig); configurationManager.addPackageConfig("", defaultPackageConfig); Modified: struts/struts2/trunk/core/src/test/resources/struts.xml URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/test/resources/struts.xml?view=diff&rev=451943&r1=451942&r2=451943 ============================================================================== --- struts/struts2/trunk/core/src/test/resources/struts.xml (original) +++ struts/struts2/trunk/core/src/test/resources/struts.xml Mon Oct 2 03:10:07 2006 @@ -2,6 +2,7 @@ "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN" "http://struts.apache.org/dtds/struts-2.0.dtd"> <struts> + <include file="struts-default.xml" /> <package name="default" extends="struts-default"> <action name="hello" class="com.opensymphony.xwork2.ActionSupport"> <result name="success">hello.jsp</result>