WW-3671 - Two TestAction classes confuse eclipse (sometimes)

git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1157665 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Maurizio Cucchiara
2011-08-14 20:57:58 +00:00
parent 90f9e3a846
commit 3343161e12
6 changed files with 7 additions and 7 deletions
@@ -22,7 +22,7 @@ package org.apache.struts2;
import com.opensymphony.xwork2.ActionSupport;
public class TestAction extends ActionSupport {
public class JunitTestAction extends ActionSupport {
private String name;
public String getName() {
@@ -34,7 +34,7 @@ import java.io.UnsupportedEncodingException;
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations={"classpath*:applicationContext.xml"})
public class StrutsSpringJUnit4TestCaseTest extends StrutsSpringJUnit4TestCase<TestAction> {
public class StrutsSpringJUnit4TestCaseTest extends StrutsSpringJUnit4TestCase<JunitTestAction> {
@Test
public void getActionMapping() {
@@ -52,7 +52,7 @@ public class StrutsSpringJUnit4TestCaseTest extends StrutsSpringJUnit4TestCase<T
ActionProxy proxy = getActionProxy("/test/testAction.action");
Assert.assertNotNull(proxy);
TestAction action = (TestAction) proxy.getAction();
JunitTestAction action = (JunitTestAction) proxy.getAction();
Assert.assertNotNull(action);
String result = proxy.execute();
@@ -23,7 +23,7 @@ package org.apache.struts2;
public class StrutsSpringTestCaseTest extends StrutsSpringTestCase {
public void testApplicationContext() {
assertNotNull(applicationContext);
TestAction action = (TestAction) applicationContext.getBean("testAction");
JunitTestAction action = (JunitTestAction) applicationContext.getBean("testAction");
assertNotNull(action);
}
}
@@ -42,7 +42,7 @@ public class StrutsTestCaseTest extends StrutsSpringTestCase {
ActionProxy proxy = getActionProxy("/test/testAction.action");
assertNotNull(proxy);
TestAction action = (TestAction) proxy.getAction();
JunitTestAction action = (JunitTestAction) proxy.getAction();
assertNotNull(action);
String result = proxy.execute();
@@ -2,5 +2,5 @@
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
<bean id="testAction" class="org.apache.struts2.TestAction"/>
<bean id="testAction" class="org.apache.struts2.JunitTestAction"/>
</beans>
+1 -1
View File
@@ -7,7 +7,7 @@
<struts>
<constant name="struts.objectFactory" value="spring"/>
<package name="test" namespace="/test" extends="struts-default">
<action name="testAction" class="org.apache.struts2.TestAction">
<action name="testAction" class="org.apache.struts2.JunitTestAction">
<result type="freemarker">/template.ftl</result>
</action>
</package>