Adding tests to ensure results are overridden correctly

WW-2559


git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@667743 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Donald J. Brown
2008-06-14 04:40:02 +00:00
parent 873d150890
commit 3b6d7cfe82
2 changed files with 9 additions and 2 deletions
@@ -147,7 +147,14 @@ public class ClasspathPackageProviderTest extends TestCase {
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() {
@@ -23,7 +23,7 @@ package org.apache.struts2.config.cltest;
import org.apache.struts2.config.Result;
@Result("foo.jsp")
@Result(name="input", value="input-parent.jsp")
public class OneResultAction {
}