@@ -27,19 +27,19 @@ protected void setUp() throws IOException {
27
27
public void testAnExistingDirectory () {
28
28
assertMatches ("matches existing directory" , FileMatchers .anExistingDirectory (), directory );
29
29
assertDoesNotMatch ("doesn't match existing file" , FileMatchers .anExistingDirectory (), file );
30
- assertDoesNotMatch ( "doesn't match missing file " , FileMatchers .anExistingDirectory (), new File ("foo" ));
30
+ assertMismatchDescription ( "'foo' is not a directory " , FileMatchers .anExistingDirectory (), new File ("foo" ));
31
31
}
32
32
33
33
public void testAnExistingFileOrDirectory () {
34
34
assertMatches ("matches existing file" , FileMatchers .anExistingFileOrDirectory (), file );
35
35
assertMatches ("matches existing directory" , FileMatchers .anExistingFileOrDirectory (), directory );
36
- assertDoesNotMatch ( "doesn't match missing file " , FileMatchers .anExistingFileOrDirectory (), new File ("foo" ));
36
+ assertMismatchDescription ( "'foo' does not exist " , FileMatchers .anExistingFileOrDirectory (), new File ("foo" ));
37
37
}
38
38
39
39
public void testAnExistingFile () {
40
40
assertMatches ("matches existing file" , FileMatchers .anExistingFile (), file );
41
41
assertDoesNotMatch ("doesn't match existing directory" , FileMatchers .anExistingFile (), directory );
42
- assertDoesNotMatch ( "doesn't match missing file" , FileMatchers .anExistingFile (), new File ("foo" ));
42
+ assertMismatchDescription ( "'foo' is not a file" , FileMatchers .anExistingFile (), new File ("foo" ));
43
43
}
44
44
45
45
public void testAReadableFile () { // Not all OSes will allow setting readability so have to be forgiving here.
0 commit comments