You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by se...@apache.org on 2010/09/01 17:47:16 UTC

svn commit: r991576 - /commons/proper/jci/trunk/fam/src/test/java/org/apache/commons/jci/monitor/FilesystemAlterationMonitorTestCase.java

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();        
     }