Day: November 4, 2008

  • JUnit Shortcomings I

    A few days back I wrote a test that used the filesystem. In order to keep my test independant from any particular file layout I usually do something like this: public class SomeFileSystemTest { @Test public void performTest() throws IOException { doStuff(tempDir); … } private File tempDir; @After public void deleteTempDir() throws IOException { FileUtils.deleteDirectory(tempDir);…