struts-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mr...@apache.org
Subject svn commit: r667743 - in /struts/struts2/trunk/plugins/codebehind/src/test/java/org/apache/struts2/config: ClasspathPackageProviderTest.java cltest/OneResultAction.java
Date Sat, 14 Jun 2008 04:40:02 GMT
Author: mrdon
Date: Fri Jun 13 21:40:02 2008
New Revision: 667743

URL: http://svn.apache.org/viewvc?rev=667743&view=rev
Log:
Adding tests to ensure results are overridden correctly
WW-2559

Modified:
    struts/struts2/trunk/plugins/codebehind/src/test/java/org/apache/struts2/config/ClasspathPackageProviderTest.java
    struts/struts2/trunk/plugins/codebehind/src/test/java/org/apache/struts2/config/cltest/OneResultAction.java

Modified: struts/struts2/trunk/plugins/codebehind/src/test/java/org/apache/struts2/config/ClasspathPackageProviderTest.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/codebehind/src/test/java/org/apache/struts2/config/ClasspathPackageProviderTest.java?rev=667743&r1=667742&r2=667743&view=diff
==============================================================================
--- struts/struts2/trunk/plugins/codebehind/src/test/java/org/apache/struts2/config/ClasspathPackageProviderTest.java
(original)
+++ struts/struts2/trunk/plugins/codebehind/src/test/java/org/apache/struts2/config/ClasspathPackageProviderTest.java
Fri Jun 13 21:40:02 2008
@@ -147,7 +147,14 @@
         assertEquals("/cltest", pkg.getNamespace());
         ActionConfig acfg = pkg.getActionConfigs().get("twoResult");
         assertNotNull(acfg);
-        assertEquals(3, acfg.getResults().size());
+        assertEquals(2, acfg.getResults().size());
+        assertEquals("input.jsp", acfg.getResults().get("input").getParams().get("location"));
+        assertEquals("bob", acfg.getResults().get("chain").getParams().get("location"));
+
+        acfg = pkg.getActionConfigs().get("oneResult");
+        assertNotNull(acfg);
+        assertEquals(1, acfg.getResults().size());
+        assertEquals("input-parent.jsp", acfg.getResults().get("input").getParams().get("location"));
     }
 
     public void testActionImplementation() {

Modified: struts/struts2/trunk/plugins/codebehind/src/test/java/org/apache/struts2/config/cltest/OneResultAction.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/codebehind/src/test/java/org/apache/struts2/config/cltest/OneResultAction.java?rev=667743&r1=667742&r2=667743&view=diff
==============================================================================
--- struts/struts2/trunk/plugins/codebehind/src/test/java/org/apache/struts2/config/cltest/OneResultAction.java
(original)
+++ struts/struts2/trunk/plugins/codebehind/src/test/java/org/apache/struts2/config/cltest/OneResultAction.java
Fri Jun 13 21:40:02 2008
@@ -23,7 +23,7 @@
 
 import org.apache.struts2.config.Result;
 
-@Result("foo.jsp")
+@Result(name="input", value="input-parent.jsp")
 public class OneResultAction {
 
 }



Mime
View raw message