Added doc.

git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1158319 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Maurizio Cucchiara
2011-08-16 15:12:18 +00:00
parent c035f4cb4a
commit 7e1b849155
6 changed files with 14 additions and 7 deletions
@@ -228,6 +228,12 @@ public abstract class StrutsJUnit4TestCase<T> extends XWorkJUnit4TestCase {
return du;
}
/**
* Override this method to return a comma separated list of paths to a configuration
* file.
* <p>The default implementation simply returns <code>null</code>.
* @return a comma separated list of config locations
*/
protected String getConfigPath() {
return null;
}
@@ -1,5 +1,5 @@
/*
* $Id: $
* $Id$
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -32,8 +32,8 @@ import org.junit.Test;
public class StrutsJUnit4TestCaseTest extends StrutsJUnit4TestCase<JUnitTestAction>{
@Test
public void testExecuteActionAgainstCustomStrutsConfigFile() throws Exception {
String output = executeAction("/test2/testAction2.action");
Assert.assertEquals("Test2", output);
String output = executeAction("/test/testAction-2.action");
Assert.assertEquals("Test-2", output);
}
@Override
@@ -26,9 +26,9 @@
"http://struts.apache.org/dtds/struts-2.1.dtd">
<struts>
<package name="test2" namespace="/test2" extends="struts-default">
<action name="testAction2" class="org.apache.struts2.JUnitTestAction">
<result type="freemarker">/template2.ftl</result>
<package name="test" namespace="/test" extends="struts-default">
<action name="testAction-2" class="org.apache.struts2.JUnitTestAction">
<result type="freemarker">/template-2.ftl</result>
</action>
</package>
</struts>
+1 -1
View File
@@ -8,7 +8,7 @@
<constant name="struts.objectFactory" value="spring"/>
<package name="test" namespace="/test" extends="struts-default">
<action name="testAction" class="org.apache.struts2.JUnitTestAction">
<result type="freemarker">/template.ftl</result>
<result type="freemarker">/template-1.ftl</result>
</action>
</package>
</struts>
@@ -0,0 +1 @@
Test-2