Struts 2
  1. Struts 2
  2. WW-3667

StrutsJUnit4TestCase does not provide the executeAction method

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.3.1
    • Component/s: Unit Tests
    • Labels:
      None

      Description

      StrutsJUnit4TestCase does not provide the executeAction method as its predecessor did (StrutsTestCase).

        Issue Links

          Activity

          Hide
          Hudson added a comment -

          Integrated in Struts2 #334 (See https://builds.apache.org/job/Struts2/334/)
          WW-3667 - StrutsJUnit4TestCase does not provide the executeAction method

          mcucchiara :
          Files :

          • /struts/struts2/trunk/plugins/junit/src/main/java/org/apache/struts2/StrutsSpringTestCase.java
          • /struts/struts2/trunk/plugins/junit/src/main/java/org/apache/struts2/StrutsJUnit4TestCase.java
          • /struts/struts2/trunk/plugins/junit/src/main/java/org/apache/struts2/StrutsSpringJUnit4TestCase.java
          • /struts/struts2/trunk/plugins/junit/src/main/java/org/apache/struts2/StrutsTestCase.java
          Show
          Hudson added a comment - Integrated in Struts2 #334 (See https://builds.apache.org/job/Struts2/334/ ) WW-3667 - StrutsJUnit4TestCase does not provide the executeAction method mcucchiara : Files : /struts/struts2/trunk/plugins/junit/src/main/java/org/apache/struts2/StrutsSpringTestCase.java /struts/struts2/trunk/plugins/junit/src/main/java/org/apache/struts2/StrutsJUnit4TestCase.java /struts/struts2/trunk/plugins/junit/src/main/java/org/apache/struts2/StrutsSpringJUnit4TestCase.java /struts/struts2/trunk/plugins/junit/src/main/java/org/apache/struts2/StrutsTestCase.java
          Hide
          Maurizio Cucchiara added a comment -

          From now it should be simpler running a test:

          YourActionIntegrationTest.java
          @RunWith(SpringJUnit4ClassRunner.class)
          @ContextConfiguration(locations = {"your-application-context.xml"})
          public class YourActionIntegrationTest extends StrutsSpringJUnit4TestCase<YourAction> {
              @Test
              public void executeTest() throws Exception {
                  String result = executeAction("/your-action");
                  YourAction action = getAction();
                  assertFalse(containsErrors());
              }
          
          }
          
          Show
          Maurizio Cucchiara added a comment - From now it should be simpler running a test: YourActionIntegrationTest.java @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(locations = { "your-application-context.xml" }) public class YourActionIntegrationTest extends StrutsSpringJUnit4TestCase<YourAction> { @Test public void executeTest() throws Exception { String result = executeAction( "/your-action" ); YourAction action = getAction(); assertFalse(containsErrors()); } }

            People

            • Assignee:
              Maurizio Cucchiara
              Reporter:
              Maurizio Cucchiara
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development