01: /*
02: * All content copyright (c) 2003-2006 Terracotta, Inc., except as may otherwise be noted in a separate copyright notice. All rights reserved.
03: */
04: package com.tcsimulator;
05:
06: import com.tc.object.config.ConfigVisitor;
07: import com.tc.object.config.DSOApplicationConfig;
08: import com.tc.simulator.distrunner.ArgException;
09: import com.tc.simulator.distrunner.ArgParser;
10: import com.tc.simulator.distrunner.SpecFactoryImpl;
11: import com.tcsimulator.distrunner.ServerSpecImpl;
12:
13: public class TestSetup {
14:
15: private static TestSpec testSpec;
16:
17: public static void main(String[] args) throws ArgException {
18: ArgParser parser = new ArgParser(args, new SpecFactoryImpl(),
19: false, false);
20: testSpec = new TestSpec(parser.getTestClassname(), parser
21: .getIntensity(), parser.getClientSpecs(), parser
22: .getServerSpecs());
23: if (false) {
24: // this is here to suppress warnings.
25: testSpec.equals("foo");
26: }
27: }
28:
29: public static void visitDSOApplicationConfig(ConfigVisitor visitor,
30: DSOApplicationConfig cfg) {
31: cfg
32: .addRoot("testSpec", TestSetup.class.getName()
33: + ".testSpec");
34: // XXX: sorry this breaks the factory encapsulation, oh well
35: cfg.addIncludePattern(ServerSpecImpl.class.getName());
36: cfg.addIncludePattern(ClientSpecImpl.class.getName());
37: }
38:
39: }
|