1 4 package com.tctest; 5 6 import com.tc.object.config.ConfigVisitor; 7 import com.tc.object.config.DSOClientConfigHelper; 8 import com.tc.object.config.TransparencyClassSpec; 9 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, ListenerProvider listenerProvider) { 22 super(appId, cfg, listenerProvider); 23 } 24 25 public void run() { 26 if (root == null) { 27 root = new HashMap (); 28 } else { 29 root = null; 30 } 31 32 if (staticRoot == null) { 33 staticRoot = new HashMap (); 34 } else { 35 staticRoot = null; 36 } 37 38 } 39 40 public static void visitL1DSOConfig(ConfigVisitor visitor, DSOClientConfigHelper config) { 41 String testClass = NullRootTestApp.class.getName(); 42 TransparencyClassSpec spec = config.getOrCreateSpec(testClass); 43 spec.addRoot("root", "root"); 44 spec.addRoot("staticRoot", "staticRoot"); 45 } 46 47 } 48 | Popular Tags |