commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r991576 - /commons/proper/jci/trunk/fam/src/test/java/org/apache/commons/jci/monitor/FilesystemAlterationMonitorTestCase.java
Date Wed, 01 Sep 2010 15:47:16 GMT
Author: sebb
Date: Wed Sep  1 15:47:16 2010
New Revision: 991576

URL: http://svn.apache.org/viewvc?rev=991576&view=rev
Log:
Better docs in case test fails

Modified:
    commons/proper/jci/trunk/fam/src/test/java/org/apache/commons/jci/monitor/FilesystemAlterationMonitorTestCase.java

Modified: commons/proper/jci/trunk/fam/src/test/java/org/apache/commons/jci/monitor/FilesystemAlterationMonitorTestCase.java
URL: http://svn.apache.org/viewvc/commons/proper/jci/trunk/fam/src/test/java/org/apache/commons/jci/monitor/FilesystemAlterationMonitorTestCase.java?rev=991576&r1=991575&r2=991576&view=diff
==============================================================================
--- commons/proper/jci/trunk/fam/src/test/java/org/apache/commons/jci/monitor/FilesystemAlterationMonitorTestCase.java
(original)
+++ commons/proper/jci/trunk/fam/src/test/java/org/apache/commons/jci/monitor/FilesystemAlterationMonitorTestCase.java
Wed Sep  1 15:47:16 2010
@@ -224,18 +224,20 @@ public final class FilesystemAlterationM
         start();
 
         final File file = writeFile("file", "file");
+
+        assertTrue("file should exist", file.exists());
         
         listener.waitForCheck();
         
-        assertEquals(1, listener.getCreatedFiles().size());
-        assertEquals(0, listener.getChangedDirectories().size());
+        assertEquals("expecting 1 file created", 1, listener.getCreatedFiles().size());
+        assertEquals("expecting 0 directories changed", 0, listener.getChangedDirectories().size());
         
         file.delete();
-        assertTrue(!file.exists());
+        assertFalse("file should not exist", file.exists());
 
         listener.waitForCheck();
         
-        assertEquals(1, listener.getDeletedFiles().size());
+        assertEquals("expecting 1 file deleted", 1, listener.getDeletedFiles().size());
         
         stop();        
     }



Mime
View raw message