Skip to content

Commit d221f48

Browse files
committed
Adjust to new method signatures (File instead of String)
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/io/trunk@140407 13f79535-47bb-0310-9956-ffa450edef68
1 parent 2060d3b commit d221f48

1 file changed

Lines changed: 10 additions & 10 deletions

File tree

src/test/org/apache/commons/io/FileUtilsTestCase.java

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
2-
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//io/src/test/org/apache/commons/io/FileUtilsTestCase.java,v 1.4 2003/10/17 20:15:46 matth Exp $
3-
* $Revision: 1.4 $
4-
* $Date: 2003/10/17 20:15:46 $
2+
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//io/src/test/org/apache/commons/io/FileUtilsTestCase.java,v 1.5 2003/11/22 20:48:10 jeremias Exp $
3+
* $Revision: 1.5 $
4+
* $Date: 2003/11/22 20:48:10 $
55
*
66
* ====================================================================
77
*
@@ -75,7 +75,7 @@
7575
*
7676
* @author Peter Donald
7777
* @author Matthew Hawthorne
78-
* @version $Id: FileUtilsTestCase.java,v 1.4 2003/10/17 20:15:46 matth Exp $
78+
* @version $Id: FileUtilsTestCase.java,v 1.5 2003/11/22 20:48:10 jeremias Exp $
7979
* @see FileUtils
8080
*/
8181
public final class FileUtilsTestCase extends FileBasedTestCase {
@@ -141,9 +141,9 @@ public void testByteCountToDisplaySize() {
141141
// waitFor
142142

143143
public void testWaitFor() {
144-
FileUtils.waitFor("", -1);
144+
FileUtils.waitFor(new File(""), -1);
145145

146-
FileUtils.waitFor("", 2);
146+
FileUtils.waitFor(new File(""), 2);
147147
}
148148

149149
// toURL
@@ -520,20 +520,20 @@ public void testFileUtils() throws Exception {
520520
"Second test file does not exist",
521521
!FileUtils.fileExists(filename2));
522522

523-
FileUtils.fileWrite(filename2, filename);
523+
FileUtils.writeStringToFile(new File(filename2), filename, "UTF-8");
524524
assertTrue("Second file was written", FileUtils.fileExists(filename2));
525525

526-
final String file2contents = FileUtils.fileRead(filename2);
526+
final String file2contents = FileUtils.readFileToString(new File(filename2), "UTF-8");
527527
assertTrue(
528528
"Second file's contents correct",
529-
FileUtils.fileRead(filename2).equals(file2contents));
529+
FileUtils.readFileToString(new File(filename2), "UTF-8").equals(file2contents));
530530

531531
FileUtils.fileDelete(filename2);
532532
assertTrue(
533533
"Second test file does not exist",
534534
!FileUtils.fileExists(filename2));
535535

536-
final String contents = FileUtils.fileRead(filename);
536+
final String contents = FileUtils.readFileToString(new File(filename), "UTF-8");
537537
assertTrue("FileUtils.fileRead()", contents.equals("This is a test"));
538538

539539
}

0 commit comments

Comments
 (0)