File tree Expand file tree Collapse file tree
src/test/org/apache/commons/io Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3333 *
3434 * @author Peter Donald
3535 * @author Matthew Hawthorne
36- * @version $Id: FileUtilsTestCase.java,v 1.21 2004/07/15 08:21:14 scolebourne Exp $
36+ * @version $Id: FileUtilsTestCase.java,v 1.22 2004/07/15 09:49:53 jeremias Exp $
3737 * @see FileUtils
3838 */
3939public class FileUtilsTestCase extends FileBasedTestCase {
@@ -453,6 +453,10 @@ public void testFileUtils() throws Exception {
453453
454454 public void testTouch () throws IOException {
455455 File file = new File (getTestDirectory (), "touch.txt" ) ;
456+ if (file .exists ()) {
457+ file .delete ();
458+ }
459+ assertTrue ("Prerequisite failed, test file exists" , !file .exists ());
456460 FileUtils .touch (file );
457461 assertTrue ("FileUtils.touch() created file." , file .exists ());
458462 FileOutputStream out = new FileOutputStream (file ) ;
You can’t perform that action at this time.
0 commit comments