1 22 package org.jboss.test; 23 24 import junit.extensions.TestSetup; 25 import junit.framework.Test; 26 27 33 public class AbstractTestSetup extends TestSetup 34 { 35 36 protected Class clazz; 37 38 39 protected static AbstractTestDelegate delegate; 40 41 47 public AbstractTestSetup(Class clazz, Test test) 48 { 49 super(test); 50 this.clazz = clazz; 51 } 52 53 59 protected void setUp() throws Exception  60 { 61 super.setUp(); 62 delegate = AbstractTestDelegate.getDelegate(clazz); 63 delegate.setUp(); 64 } 65 66 70 protected void tearDown() throws Exception  71 { 72 if (delegate != null) 73 delegate.tearDown(); 74 } 75 } 76 | Popular Tags |