jeremias    2003/11/22 13:06:41

  Modified:    io/src/test/org/apache/commons/io FileUtilsTestCase.java
  Log:
  Fix test for contentEquals which throws an exception upon comparing directories now.
  
  Revision  Changes    Path
  1.7       +10 -7     
jakarta-commons-sandbox/io/src/test/org/apache/commons/io/FileUtilsTestCase.java
  
  Index: FileUtilsTestCase.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-commons-sandbox/io/src/test/org/apache/commons/io/FileUtilsTestCase.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- FileUtilsTestCase.java    22 Nov 2003 20:50:01 -0000      1.6
  +++ FileUtilsTestCase.java    22 Nov 2003 21:06:41 -0000      1.7
  @@ -174,10 +174,13 @@
           final File file = new File(getTestDirectory(), getName());
           assertTrue(FileUtils.contentEquals(file, file));
   
  -        // TODO Should comparing 2 directories throw an Exception instead of 
returning false?
           // Directories
  -        assertTrue(
  -            !FileUtils.contentEquals(getTestDirectory(), getTestDirectory()));
  +        try {
  +            FileUtils.contentEquals(getTestDirectory(), getTestDirectory());
  +            fail("Comparing directories should fail with an IOException");
  +        } catch (IOException ioe) {
  +            //expected
  +        }
   
           // Different files
           final File objFile1 =
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to