mirror of
https://github.com/apache/struts.git
synced 2026-08-11 01:27:14 +00:00
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:
+8
-1
@@ -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() {
|
||||
|
||||
+1
-1
@@ -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 {
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user