KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > tcsimulator > TestSetup


1 /*
2  * All content copyright (c) 2003-2006 Terracotta, Inc., except as may otherwise be noted in a separate copyright notice. All rights reserved.
3  */

4 package com.tcsimulator;
5
6 import com.tc.object.config.ConfigVisitor;
7 import com.tc.object.config.DSOApplicationConfig;
8 import com.tc.simulator.distrunner.ArgException;
9 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 JavaDoc[] args) throws ArgException {
18     ArgParser parser = new ArgParser(args, new SpecFactoryImpl(), false, false);
19     testSpec = new TestSpec(parser.getTestClassname(), parser.getIntensity(), parser.getClientSpecs(), parser
20         .getServerSpecs());
21     if (false) {
22       // this is here to suppress warnings.
23
testSpec.equals("foo");
24     }
25   }
26
27   public static void visitDSOApplicationConfig(ConfigVisitor visitor, DSOApplicationConfig cfg) {
28     cfg.addRoot("testSpec", TestSetup.class.getName() + ".testSpec");
29     // XXX: sorry this breaks the factory encapsulation, oh well
30
cfg.addIncludePattern(ServerSpecImpl.class.getName());
31     cfg.addIncludePattern(ClientSpecImpl.class.getName());
32   }
33
34 }
35
Popular Tags