01: /*
02: * Copyright 2005-2007 The Kuali Foundation.
03: *
04: *
05: * Licensed under the Educational Community License, Version 1.0 (the "License");
06: * you may not use this file except in compliance with the License.
07: * You may obtain a copy of the License at
08: *
09: * http://www.opensource.org/licenses/ecl1.php
10: *
11: * Unless required by applicable law or agreed to in writing, software
12: * distributed under the License is distributed on an "AS IS" BASIS,
13: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14: * See the License for the specific language governing permissions and
15: * limitations under the License.
16: */
17: // Created on May 8, 2006
18: package edu.iu.uis.eden.test.web;
19:
20: import java.util.HashMap;
21: import java.util.Map;
22:
23: import javax.servlet.Servlet;
24:
25: import junit.framework.TestCase;
26: import edu.iu.uis.eden.test.web.framework.LocalInteractionController;
27: import edu.iu.uis.eden.test.web.framework.Script;
28:
29: /**
30: * Tests the script framework against a trivial TestServlet.
31: * @author Aaron Hamid (arh14 at cornell dot edu)
32: */
33: public class TestServletTest extends TestCase {
34: public void test() throws Exception {
35: // we aren't really going to use the context for anything...
36: Map context = new HashMap();
37:
38: Servlet servlet = new TestServlet();
39: Script script = new Script(getClass().getResourceAsStream(
40: "TestServletScript.xml"),
41: new LocalInteractionController(servlet));
42:
43: script.run(context);
44: }
45: }
|