/** * Get the unique testing directory while ensuring that it is empty (if not). * * @return the unique testing directory, created, and empty. */ public File getEmptyDir() { if (dir.exists()) { FS.ensureEmpty(dir); return dir; } Assert.assertTrue("Creating testing dir", dir.mkdirs()); return dir; }
/** * Ensure that the test directory is empty. * * <p>Useful for repeated testing without using the maven <code>clean</code> goal (such as within * Eclipse). */ public void ensureEmpty() { FS.ensureEmpty(dir); }