... until the collector arrives ...

This "blog" is really just a scratchpad of mine. There is not much of general interest here. Most of the content is scribbled down "live" as I discover things I want to remember. I rarely go back to correct mistakes in older entries. You have been warned :)

2005-12-01

JUnit Fixture Setup

suite() method as follows:

    public static Test suite()
    {
        return new TestSetup(new TestSuite(ThisClass.class)) {
            protected void setUp() { setUpFixture(); };
            protected void tearDown() { tearDownFixture(); };
        };
    }

It doesn't work properly in Eclipse, however, if you try to run a single test method -- the fixture set-up and tear-down are not run.  SingleSetupTestSuite defined in my SQL testhelpers library does not suffer from this problem (perhaps I should make a general version of that class some day).

Blog Archive