01: package com.mockrunner.gen;
02:
03: import java.util.ArrayList;
04: import java.util.List;
05:
06: import com.mockrunner.connector.ConnectorTestModule;
07: import com.mockrunner.ejb.EJBTestModule;
08: import com.mockrunner.gen.proc.BasicAdapterProcessor;
09: import com.mockrunner.gen.proc.EJBBasicAdapterProcessor;
10: import com.mockrunner.gen.proc.JDBCBasicAdapterProcessor;
11: import com.mockrunner.gen.proc.StandardAdapterProcessor;
12: import com.mockrunner.jdbc.JDBCTestModule;
13: import com.mockrunner.jms.JMSTestModule;
14: import com.mockrunner.servlet.ServletTestModule;
15: import com.mockrunner.struts.ActionTestModule;
16: import com.mockrunner.tag.TagTestModule;
17:
18: public class AdapterGenerator extends AbstractAdapterGenerator {
19: public static void main(String[] args) throws Exception {
20: AdapterGenerator generator = new AdapterGenerator();
21: generator.generate();
22: }
23:
24: protected String getSrcDir() {
25: return "src";
26: }
27:
28: protected List initialize() {
29: List units = new ArrayList();
30: List actionExcluded = new ArrayList();
31: actionExcluded.add("getOutput");
32: units.add(new ProcessingUnit(ActionTestModule.class,
33: new StandardAdapterProcessor(), actionExcluded));
34: units.add(new ProcessingUnit(ActionTestModule.class,
35: new BasicAdapterProcessor(), actionExcluded));
36: List servletExcluded = new ArrayList();
37: servletExcluded.add("getOutput");
38: units.add(new ProcessingUnit(ServletTestModule.class,
39: new StandardAdapterProcessor(), servletExcluded));
40: units.add(new ProcessingUnit(ServletTestModule.class,
41: new BasicAdapterProcessor(), servletExcluded));
42: List tagExcluded = new ArrayList();
43: tagExcluded.add("getOutput");
44: units.add(new ProcessingUnit(TagTestModule.class,
45: new StandardAdapterProcessor(), tagExcluded));
46: units.add(new ProcessingUnit(TagTestModule.class,
47: new BasicAdapterProcessor(), tagExcluded));
48: units.add(new ProcessingUnit(EJBTestModule.class,
49: new StandardAdapterProcessor(), null));
50: units.add(new ProcessingUnit(EJBTestModule.class,
51: new EJBBasicAdapterProcessor(), null));
52: units.add(new ProcessingUnit(JDBCTestModule.class,
53: new StandardAdapterProcessor(), null));
54: units.add(new ProcessingUnit(JDBCTestModule.class,
55: new JDBCBasicAdapterProcessor(), null));
56: units.add(new ProcessingUnit(JMSTestModule.class,
57: new StandardAdapterProcessor(), null));
58: units.add(new ProcessingUnit(JMSTestModule.class,
59: new BasicAdapterProcessor(), null));
60: units.add(new ProcessingUnit(ConnectorTestModule.class,
61: new StandardAdapterProcessor(), null));
62: units.add(new ProcessingUnit(ConnectorTestModule.class,
63: new BasicAdapterProcessor(), null));
64: return units;
65: }
66: }
|