private void CreateDirTest() throws AssertException { // #ifdef DEBUG debug.trace("CreateDirTest"); // #endif boolean ret; Path.removeDirectory(Path.hidden() + dir1 + dir2); Path.removeDirectory(Path.hidden() + dir1); ret = Path.createDirectory(Path.hidden() + dir1); AssertThat(ret, "Cannot create dir1 "); ret = Path.createDirectory(Path.hidden() + dir1 + dir2); AssertThat(ret, "Cannot create dir2 "); }
private void RemoveDirTest() throws AssertException { // #ifdef DEBUG debug.trace("RemoveDirTest"); // #endif boolean ret; ret = Path.removeDirectory(Path.hidden() + dir1); AssertThat(!ret, "shouldn't delete dir1 "); ret = Path.removeDirectory(Path.hidden() + dir1 + dir2); AssertThat(ret, "Cannot delete dir2 "); ret = Path.removeDirectory(Path.hidden() + dir1); AssertThat(ret, "Cannot delete dir1 "); }
/* * (non-Javadoc) * @see tests.TestUnit#run() */ public boolean run() throws AssertException { Path.printRoots(); CreateDirTest(); RemoveDirTest(); return true; }