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 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.6 2003/11/22 20:50:01 jeremias Exp $
3- * $Revision: 1.6 $
4- * $Date: 2003/11/22 20:50:01 $
2+ * $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//io/src/test/org/apache/commons/io/FileUtilsTestCase.java,v 1.7 2003/11/22 21:06:41 jeremias Exp $
3+ * $Revision: 1.7 $
4+ * $Date: 2003/11/22 21:06:41 $
55 *
66 * ====================================================================
77 *
7575 *
7676 * @author Peter Donald
7777 * @author Matthew Hawthorne
78- * @version $Id: FileUtilsTestCase.java,v 1.6 2003/11/22 20:50:01 jeremias Exp $
78+ * @version $Id: FileUtilsTestCase.java,v 1.7 2003/11/22 21:06:41 jeremias Exp $
7979 * @see FileUtils
8080 */
8181public final class FileUtilsTestCase extends FileBasedTestCase {
@@ -174,10 +174,13 @@ public void testContentEquals() throws Exception {
174174 final File file = new File (getTestDirectory (), getName ());
175175 assertTrue (FileUtils .contentEquals (file , file ));
176176
177- // TODO Should comparing 2 directories throw an Exception instead of returning false?
178177 // Directories
179- assertTrue (
180- !FileUtils .contentEquals (getTestDirectory (), getTestDirectory ()));
178+ try {
179+ FileUtils .contentEquals (getTestDirectory (), getTestDirectory ());
180+ fail ("Comparing directories should fail with an IOException" );
181+ } catch (IOException ioe ) {
182+ //expected
183+ }
181184
182185 // Different files
183186 final File objFile1 =
You can’t perform that action at this time.
0 commit comments