1 package org.objectweb.celtix.systest.common; 2 3 import junit.framework.Test; 4 5 import org.objectweb.celtix.Bus; 6 import org.objectweb.celtix.testutil.common.AbstractClientServerSetupBase; 7 8 public abstract class ClientServerSetupBase extends AbstractClientServerSetupBase { 9 protected String configFileName; 10 private Bus bus; 11 12 public ClientServerSetupBase(Test arg0) { 13 super(arg0); 14 } 15 16 public void setUp() throws Exception { 17 if (configFileName != null) { 18 System.setProperty("celtix.config.file", configFileName); 19 } 20 bus = Bus.init(); 21 Bus.setCurrent(bus); 22 super.setUp(); 23 } 24 25 public void tearDown() throws Exception { 26 super.tearDown(); 27 bus.shutdown(true); 28 Bus.setCurrent(null); 29 bus = null; 30 if (configFileName != null) { 31 System.clearProperty("celtix.config.file"); 32 } 33 } 34 35 } 36 | Popular Tags |