1
2 package net.smartlab.web.test;
3
4 import java.io.File;
5 import java.lang.reflect.Method;
6
7 import org.apache.struts.action.ActionServlet;
8
9 import net.sf.cglib.proxy.Callback;
10 import net.sf.cglib.proxy.Enhancer;
11 import net.sf.cglib.proxy.MethodInterceptor;
12 import net.sf.cglib.proxy.MethodProxy;
13 import net.smartlab.web.Domain;
14 import servletunit.struts.MockStrutsTestCase;
15
16
17
18
19
20
21 public abstract class ActionTestCase extends MockStrutsTestCase {
22
23
24
25
26 protected void setUp() throws Exception {
27 super.setUp();
28 super.setContextDirectory(new File(this.getContextDirectory()));
29 super.setConfigFile("/WEB-INF/" + this.getStrutsConfigFilename());
30 super.setServletConfigFile("/WEB-INF/web.xml");
31 }
32
33 protected String getContextDirectory() {
34 return "res/test";
35 }
36
37 protected String getStrutsConfigFilename() {
38 return "struts.xml";
39 }
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63 }