Skip to content

Commit

Permalink
WW-4522 Support latest stable AngularJS version in maven angularjs ar…
Browse files Browse the repository at this point in the history
…chetype

- Rename HelloAction to ApplicationAction
  • Loading branch information
jogep committed Jul 10, 2015
1 parent 7928d34 commit 8312ed1
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
/**
* <code>Set welcome message.</code>
*/
public class HelloAction extends ActionSupport {
public class ApplicationAction extends ActionSupport {

private static final long serialVersionUID = -3243216917801206214L;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
import org.apache.struts2.convention.annotation.Results;

@Results({
@Result(name = Action.SUCCESS, location = "${redirectName}", type = "redirectAction")
@Result(name = Action.SUCCESS, location = "${redirectName}", type = "redirectAction")
})
public class Index extends ActionSupport {

Expand All @@ -35,7 +35,7 @@ public class Index extends ActionSupport {
private String redirectName;

public String execute() {
redirectName = "hello";
redirectName = "application";
return Action.SUCCESS;
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<% response.sendRedirect("hello"); %>
<% response.sendRedirect("application"); %>
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,12 @@
import com.opensymphony.xwork2.ActionSupport;
import org.apache.struts2.StrutsTestCase;

public class HelloActionTest extends StrutsTestCase {
public class ApplicationActionTest extends StrutsTestCase {

public void testHelloAction() throws Exception {
HelloAction hello = new HelloAction();
public void testApplicationAction() throws Exception {
ApplicationAction hello = new ApplicationAction();
String result = hello.execute();
assertTrue("Expected a success result!",
ActionSupport.SUCCESS.equals(result));
assertTrue("Expected the default message!",
hello.getText(HelloAction.MESSAGE).equals(hello.getMessage()));
assertTrue("Expected a success result!", ActionSupport.SUCCESS.equals(result));
assertTrue("Expected the default message!", hello.getText(ApplicationAction.MESSAGE).equals(hello.getMessage()));
}
}

0 comments on commit 8312ed1

Please sign in to comment.