1 4 package com.tctest.transparency; 5 6 import com.tc.object.bytecode.TransparentAccess; 7 import com.tc.simulator.app.ApplicationConfig; 8 import com.tc.simulator.listener.ListenerProvider; 9 import com.tctest.TestConfigurator; 10 import com.tctest.TransparentTestBase; 11 import com.tctest.TransparentTestIface; 12 import com.tctest.runner.AbstractTransparentApp; 13 14 public class InstrumentNothingTest extends TransparentTestBase implements TestConfigurator { 15 16 protected Class getApplicationClass() { 17 return InstrumentNothingTestApp.class; 18 } 19 20 public void doSetUp(TransparentTestIface t) throws Exception { 21 t.getTransparentAppConfig().setClientCount(1).setIntensity(1); 22 t.initializeTestRunner(); 23 } 24 25 public static final class InstrumentNothingTestApp extends AbstractTransparentApp { 26 27 public InstrumentNothingTestApp(String appId, ApplicationConfig cfg, ListenerProvider listenerProvider) { 28 super(appId, cfg, listenerProvider); 29 } 30 31 public void run() { 32 Class [] interfaces = getClass().getInterfaces(); 33 for (int i=0; i<interfaces.length; i++) { 34 if (TransparentAccess.class.getName().equals(interfaces[i].getName())) { 35 throw new AssertionError ("I shouldn't have been instrumented, but I was!"); 36 } 37 } 38 } 39 } 40 41 } 42
| Popular Tags
|