Commits

Anonymous committed 073d936

Fixed failing unit test AliasInterceptorTest

git-svn-id: http://svn.opensymphony.com/svn/xwork/branches/2.0@1404e221344d-f017-0410-9bd5-d282ab1896d7

  • Participants
  • Parent commits f6ce48e
  • Branches 2.0, xwork_2_0_7

Comments (0)

Files changed (3)

src/java/com/opensymphony/xwork2/mock/MockResult.java

     }
 
     public void execute(ActionInvocation invocation) throws Exception {
-        System.out.println("MockResult.execute");
+        // no op
     }
 
     public int hashCode() {

src/test/com/opensymphony/xwork2/interceptor/AliasInterceptorTest.java

  * <p/>
  * e.g.
  * <action name="aliasTest" class="com.opensymphony.xwork2.SimpleAction">
- *    <param name="foo">17</param>
- *    <param name="bar">23</param>
  *    <param name="aliases">#{ "aliasSource" : "aliasDest", "bar":"baz" }</param>
  *    <interceptor-ref name="defaultStack"/>
  *    <interceptor-ref name="alias"/>
         Map params = new HashMap();
         params.put("aliasSource", "source here");
 
-        ActionProxyFactory factory = container.getInstance(ActionProxyFactory.class);
         loadConfigurationProviders(new XmlConfigurationProvider("xwork-sample.xml"));
         ActionProxy proxy = actionProxyFactory.createActionProxy("", "aliasTest", params);
         SimpleAction actionOne = (SimpleAction) proxy.getAction();
         actionOne.setAliasSource("name to be copied");
+        actionOne.setFoo(17);
+        actionOne.setBar(23);
         proxy.execute();
         assertEquals(actionOne.getAliasSource(), actionOne.getAliasDest());
 

src/test/xwork-sample.xml

             <param name="foo">17</param>
             <param name="bar">23</param>
            	<param name="aliases">#{ "aliasSource" : "aliasDest", "bar":"baz" }</param>
-			<interceptor-ref name="defaultStack"/>
+			<interceptor-ref name="params"/>
          	<interceptor-ref name="alias"/>
          	<result name="success" type="mock" />
         </action>