示例#1
0
  /**
   * 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;
  }
示例#2
0
 /**
  * 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);
 }