You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2012/04/25 19:11:40 UTC

svn commit: r1330423 - in /commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/test: AbstractProviderTestCase.java ContentTests.java ProviderReadTests.java

Author: ggregory
Date: Wed Apr 25 17:11:39 2012
New Revision: 1330423

URL: http://svn.apache.org/viewvc?rev=1330423&view=rev
Log:
The test must pass along the file system options. This is required to get FTPS tests to work (not committed yet.)

Modified:
    commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/test/AbstractProviderTestCase.java
    commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/test/ContentTests.java
    commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/test/ProviderReadTests.java

Modified: commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/test/AbstractProviderTestCase.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/test/AbstractProviderTestCase.java?rev=1330423&r1=1330422&r2=1330423&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/test/AbstractProviderTestCase.java (original)
+++ commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/test/AbstractProviderTestCase.java Wed Apr 25 17:11:39 2012
@@ -119,6 +119,11 @@ public abstract class AbstractProviderTe
         return providerConfig.getBaseTestFolder(fs);
     }
 
+    protected FileSystem getFileSystem()
+    {
+        return getReadFolder().getFileSystem();
+    }
+
     /**
      * Returns the base test folder.  This is the parent of both the read
      * test and write test folders.

Modified: commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/test/ContentTests.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/test/ContentTests.java?rev=1330423&r1=1330422&r2=1330423&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/test/ContentTests.java (original)
+++ commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/test/ContentTests.java Wed Apr 25 17:11:39 2012
@@ -106,11 +106,6 @@ public class ContentTests
         testRoot(getManager().resolveFile(uri, fileSystem.getFileSystemOptions()));
     }
 
-    private FileSystem getFileSystem()
-    {
-        return getReadFolder().getFileSystem();
-    }
-
     /**
      * Tests root of file system exists.
      */

Modified: commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/test/ProviderReadTests.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/test/ProviderReadTests.java?rev=1330423&r1=1330422&r2=1330423&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/test/ProviderReadTests.java (original)
+++ commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/test/ProviderReadTests.java Wed Apr 25 17:11:39 2012
@@ -149,9 +149,9 @@ public class ProviderReadTests extends A
         {
             return;
         }
-        FileSystem fs = getReadFolder().getFileSystem();
+        FileSystem fs = getFileSystem();
         String uri = fs.getRootURI();
-        final FileObject file = getManager().resolveFile(uri);
+        final FileObject file = getManager().resolveFile(uri, fs.getFileSystemOptions());
         file.getChildren();
     }
 
@@ -191,7 +191,7 @@ public class ProviderReadTests extends A
      */
     public void testFolderContent() throws Exception
     {
-        if (getReadFolder().getFileSystem().hasCapability(Capability.DIRECTORY_READ_CONTENT))
+        if (getFileSystem().hasCapability(Capability.DIRECTORY_READ_CONTENT))
         {
             // test wont fail
             return;