commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject svn commit: r1330483 - in /commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/provider/ftp/test: FtpProviderTestCase.java MultipleConnectionTestCase.java
Date Wed, 25 Apr 2012 18:50:47 GMT
Author: ggregory
Date: Wed Apr 25 18:50:46 2012
New Revision: 1330483

URL: http://svn.apache.org/viewvc?rev=1330483&view=rev
Log: (empty)

Modified:
    commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/provider/ftp/test/FtpProviderTestCase.java
    commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/provider/ftp/test/MultipleConnectionTestCase.java

Modified: commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/provider/ftp/test/FtpProviderTestCase.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/provider/ftp/test/FtpProviderTestCase.java?rev=1330483&r1=1330482&r2=1330483&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/provider/ftp/test/FtpProviderTestCase.java
(original)
+++ commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/provider/ftp/test/FtpProviderTestCase.java
Wed Apr 25 18:50:46 2012
@@ -17,7 +17,6 @@
 package org.apache.commons.vfs2.provider.ftp.test;
 
 import java.io.IOException;
-import java.net.MalformedURLException;
 import java.net.URL;
 
 import junit.framework.Test;
@@ -59,6 +58,11 @@ public class FtpProviderTestCase extends
 
     private static final String USER_PROPS_RES = "org.apache.ftpserver/users.properties";
 
+    static String getConnectionUri()
+    {
+        return ConnectionUri;
+    }
+
     static int getSocketPort()
     {
         return SocketPort;
@@ -80,7 +84,7 @@ public class FtpProviderTestCase extends
      * Creates and starts an embedded Apache FTP Server (MINA).
      * 
      * @throws FtpException
-     * @throws IOException 
+     * @throws IOException
      */
     static void setUpClass() throws FtpException, IOException
     {

Modified: commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/provider/ftp/test/MultipleConnectionTestCase.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/provider/ftp/test/MultipleConnectionTestCase.java?rev=1330483&r1=1330482&r2=1330483&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/provider/ftp/test/MultipleConnectionTestCase.java
(original)
+++ commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/provider/ftp/test/MultipleConnectionTestCase.java
Wed Apr 25 18:50:46 2012
@@ -5,8 +5,12 @@ import java.net.MalformedURLException;
 import java.net.SocketException;
 
 import org.apache.commons.net.ftp.FTPClient;
+import org.apache.commons.vfs2.FileObject;
+import org.apache.commons.vfs2.FileSystemException;
+import org.apache.commons.vfs2.VFS;
 import org.apache.ftpserver.ftplet.FtpException;
 import org.junit.AfterClass;
+import org.junit.Assert;
 import org.junit.BeforeClass;
 import org.junit.Test;
 
@@ -25,6 +29,18 @@ public class MultipleConnectionTestCase
         FtpProviderTestCase.tearDownClass();
     }
 
+    private FileObject resolveRoot() throws FileSystemException
+    {
+        return VFS.getManager().resolveFile(FtpProviderTestCase.getConnectionUri());
+    }
+
+    @Test
+    public void testConnectRoot() throws SocketException, IOException
+    {
+        resolveRoot();
+        resolveRoot();
+    }
+
     @Test
     public void testUnderlyingConnect() throws SocketException, IOException
     {



Mime
View raw message