Search in sources :

Example 1 with Temporary

use of com.twitter.common.io.FileUtils.Temporary in project commons by twitter.

the class FileUtilsTest method setUp.

@Before
public void setUp() {
    final File tmpDir = FileUtils.createTempDir();
    addTearDown(new TearDown() {

        @Override
        public void tearDown() throws Exception {
            org.apache.commons.io.FileUtils.deleteDirectory(tmpDir);
        }
    });
    assertEmptyDir(tmpDir);
    temporary = new Temporary(tmpDir);
}
Also used : TearDown(com.google.common.testing.TearDown) Temporary(com.twitter.common.io.FileUtils.Temporary) File(java.io.File) IOException(java.io.IOException) Before(org.junit.Before)

Aggregations

TearDown (com.google.common.testing.TearDown)1 Temporary (com.twitter.common.io.FileUtils.Temporary)1 File (java.io.File)1 IOException (java.io.IOException)1 Before (org.junit.Before)1