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.tctest;
05:
06: import com.tc.object.config.ConfigVisitor;
07: import com.tc.object.config.DSOClientConfigHelper;
08: import com.tc.object.config.TransparencyClassSpec;
09: import com.tc.simulator.app.ApplicationConfig;
10: import com.tc.simulator.listener.ListenerProvider;
11: import com.tctest.runner.AbstractTransparentApp;
12:
13: import java.util.HashMap;
14: import java.util.Map;
15:
16: public class NullRootTestApp extends AbstractTransparentApp {
17:
18: private Map root = null;
19: private static Map staticRoot = null;
20:
21: public NullRootTestApp(String appId, ApplicationConfig cfg,
22: ListenerProvider listenerProvider) {
23: super (appId, cfg, listenerProvider);
24: }
25:
26: public void run() {
27: if (root == null) {
28: root = new HashMap();
29: } else {
30: root = null;
31: }
32:
33: if (staticRoot == null) {
34: staticRoot = new HashMap();
35: } else {
36: staticRoot = null;
37: }
38:
39: }
40:
41: public static void visitL1DSOConfig(ConfigVisitor visitor,
42: DSOClientConfigHelper config) {
43: String testClass = NullRootTestApp.class.getName();
44: TransparencyClassSpec spec = config.getOrCreateSpec(testClass);
45: spec.addRoot("root", "root");
46: spec.addRoot("staticRoot", "staticRoot");
47: }
48:
49: }
|