You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mina.apache.org by lg...@apache.org on 2016/04/15 21:31:49 UTC

mina-sshd git commit: Renamed AssertableFile#isFile to AssertableFile#exists to reflect its true meaning

Repository: mina-sshd
Updated Branches:
  refs/heads/master 876e80b70 -> 3ef5d1a93


Renamed AssertableFile#isFile to AssertableFile#exists to reflect its true meaning


Project: http://git-wip-us.apache.org/repos/asf/mina-sshd/repo
Commit: http://git-wip-us.apache.org/repos/asf/mina-sshd/commit/3ef5d1a9
Tree: http://git-wip-us.apache.org/repos/asf/mina-sshd/tree/3ef5d1a9
Diff: http://git-wip-us.apache.org/repos/asf/mina-sshd/diff/3ef5d1a9

Branch: refs/heads/master
Commit: 3ef5d1a936001079f5cc8b5dcc1e1d86f67f8ca0
Parents: 876e80b
Author: Lyor Goldstein <ly...@gmail.com>
Authored: Fri Apr 15 22:32:08 2016 +0300
Committer: Lyor Goldstein <ly...@gmail.com>
Committed: Fri Apr 15 22:32:08 2016 +0300

----------------------------------------------------------------------
 .../apache/sshd/common/file/root/AssertableFile.java    |  2 +-
 .../common/file/root/RootedFileSystemProviderTest.java  | 12 ++++++------
 2 files changed, 7 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/3ef5d1a9/sshd-core/src/test/java/org/apache/sshd/common/file/root/AssertableFile.java
----------------------------------------------------------------------
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 @@ public abstract class AssertableFile extends BaseTestSupport {
         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;

http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/3ef5d1a9/sshd-core/src/test/java/org/apache/sshd/common/file/root/RootedFileSystemProviderTest.java
----------------------------------------------------------------------
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 @@ public class RootedFileSystemProviderTest extends AssertableFile {
 
     @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 @@ public class RootedFileSystemProviderTest extends AssertableFile {
     @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 @@ public class RootedFileSystemProviderTest extends AssertableFile {
     @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 @@ public class RootedFileSystemProviderTest extends AssertableFile {
         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 @@ public class RootedFileSystemProviderTest extends AssertableFile {
         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 @@ public class RootedFileSystemProviderTest extends AssertableFile {
         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)