mirror of
https://github.com/apache/struts.git
synced 2026-08-18 13:06:59 +00:00
17 lines
568 B
Java
17 lines
568 B
Java
|
|
package tutorial;
|
||
|
|
|
||
|
|
import com.opensymphony.xwork2.ActionSupport;
|
||
|
|
import junit.framework.TestCase;
|
||
|
|
|
||
|
|
public class HelloWorldTest extends TestCase {
|
||
|
|
|
||
|
|
public void testHelloWorld() throws Exception {
|
||
|
|
HelloWorld hello_world = new HelloWorld();
|
||
|
|
String result = hello_world.execute();
|
||
|
|
assertTrue("Expected a success result!",
|
||
|
|
ActionSupport.SUCCESS.equals(result));
|
||
|
|
assertTrue("Expected the default message!",
|
||
|
|
hello_world.getText(HelloWorld.MESSAGE).equals(hello_world.getMessage()));
|
||
|
|
}
|
||
|
|
}
|