Renamed AssertableFile#isFile to AssertableFile#exists to reflect its true meaning
diff --git a/sshd-core/src/test/java/org/apache/sshd/common/file/root/AssertableFile.java b/sshd-core/src/test/java/org/apache/sshd/common/file/root/AssertableFile.java
index 4c7ac31..3d056ae 100644
--- a/sshd-core/src/test/java/org/apache/sshd/common/file/root/AssertableFile.java
+++ b/sshd-core/src/test/java/org/apache/sshd/common/file/root/AssertableFile.java
@@ -40,7 +40,7 @@
return cond;
}
- public static boolean isFile(Path p) {
+ public static boolean exists(Path p) {
boolean cond = Files.exists(p);
assertTrue(p + " exists", cond);
return cond;
diff --git a/sshd-core/src/test/java/org/apache/sshd/common/file/root/RootedFileSystemProviderTest.java b/sshd-core/src/test/java/org/apache/sshd/common/file/root/RootedFileSystemProviderTest.java
index 44eaf60..9167c17 100644
--- a/sshd-core/src/test/java/org/apache/sshd/common/file/root/RootedFileSystemProviderTest.java
+++ b/sshd-core/src/test/java/org/apache/sshd/common/file/root/RootedFileSystemProviderTest.java
@@ -66,7 +66,7 @@
@Test
public void testRoot() {
- assertTrue(isFile(fileSystem.getRoot()) && isDir(fileSystem.getRoot()) && isReadable(fileSystem.getRoot())
+ assertTrue(exists(fileSystem.getRoot()) && isDir(fileSystem.getRoot()) && isReadable(fileSystem.getRoot())
&& isRootedAt(rootSandbox, fileSystem.getRoot()));
}
@@ -74,7 +74,7 @@
@Test
public void testMkdir() throws IOException {
Path created = FileHelper.createDirectory(fileSystem.getPath(getCurrentTestName()));
- assertTrue(isFile(created) && isDir(created) && isReadable(created));
+ assertTrue(exists(created) && isDir(created) && isReadable(created));
}
@Test(expected = InvalidPathException.class)
@@ -122,7 +122,7 @@
@Test
public void testWriteFile() throws IOException {
Path created = FileHelper.createFile(fileSystem.getPath(getCurrentTestName()));
- assertTrue(isFile(created) && isReadable(created));
+ assertTrue(exists(created) && isReadable(created));
}
@Test(expected = InvalidPathException.class)
@@ -165,7 +165,7 @@
Path created = FileHelper.createFile(fileSystem.getPath(getCurrentTestName()));
Path destination = fileSystem.getPath(getCurrentTestName() + "dest");
FileHelper.copyFile(created, destination);
- assertTrue(isFile(destination) && isReadable(destination));
+ assertTrue(exists(destination) && isReadable(destination));
}
@Test(expected = InvalidPathException.class)
@@ -181,7 +181,7 @@
Path created = FileHelper.createFile(fileSystem.getPath(getCurrentTestName()));
Path destination = fileSystem.getPath(getCurrentTestName() + "dest");
FileHelper.moveFile(created, destination);
- assertTrue(notExists(created) && isFile(destination) && isReadable(destination));
+ assertTrue(notExists(created) && exists(destination) && isReadable(destination));
}
@Test(expected = InvalidPathException.class)
@@ -197,7 +197,7 @@
Path existing = FileHelper.createFile(fileSystem.getPath(getCurrentTestName()));
Path link = fileSystem.getPath(getCurrentTestName() + "link");
FileHelper.createLink(link, existing);
- assertTrue(isFile(link) && isReadable(link));
+ assertTrue(exists(link) && isReadable(link));
}
@Test(expected = InvalidPathException.class)