Has anyone tried to use the TestSetup decorator with cactus or without for
that matter.  I'm trying to do some setup 1 per Test class and it doesn't
seem to be working.  I could just use a static block, but was wondering if
anyone on the list had any thoughts first.  Note that this is just the
skeleton.

See suite() method below.

public static Test suite() {

TestSuite suite = new TestSuite(XXXX.class);
TestSetup wrapper = new TestSetup(suite) {
        protected void setup() {
                oneTimeSetup();
        }
        protected void tearDown() {
                oneTimeTearDown();
        }
};
return wrapper;
}

public static void oneTimeSetup() {
//do stuff only once
}

public static void oneTimeTearDown() {
//do stuff only once
}

Reply via email to