KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > inversoft > verge > mvc > controller > test > ActionTest


1 /*
2  * Copyright (c) 2003-2004, Inversoft
3  *
4  * This software is distribuable under the GNU Lesser General Public License.
5  * For more information visit gnu.org.
6  */

7 package com.inversoft.verge.mvc.controller.test;
8
9
10 import com.inversoft.junit.WebTestCase;
11 import com.inversoft.verge.mvc.controller.Action;
12
13
14 /**
15  * <p>
16  * This class tests the Action class.
17  * </p>
18  *
19  * @author Brian Pontarelli
20  */

21 public class ActionTest extends WebTestCase {
22
23     /**
24      * Constructs a new <code>ActionTest</code>.
25      */

26     public ActionTest(String JavaDoc name) {
27         super(name);
28         setLocal(true);
29     }
30
31
32     /**
33      * Tests everything.
34      */

35     public void testAll() {
36         Action action = new Action("foo", request, response);
37         assertSame(request, action.getHttpServletRequest());
38         assertSame(request.getSession(), action.getHttpSession());
39         assertSame(response, action.getHttpServletResponse());
40         assertSame("foo", action.getAction());
41         assertNotNull(action.getRequestContext());
42     }
43 }
Popular Tags