You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by im...@apache.org on 2005/05/12 22:35:11 UTC

svn commit: r169881 - /jakarta/commons/sandbox/vfs/trunk/src/test/org/apache/commons/vfs/RunTest.java

Author: imario
Date: Thu May 12 13:35:11 2005
New Revision: 169881

URL: http://svn.apache.org/viewcvs?rev=169881&view=rev
Log:
Documentation how to setup a VFS testserver.
On the way found some problems with the webdav provider.
Might be due to new apache?

Added:
    jakarta/commons/sandbox/vfs/trunk/src/test/org/apache/commons/vfs/RunTest.java   (with props)

Added: jakarta/commons/sandbox/vfs/trunk/src/test/org/apache/commons/vfs/RunTest.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/vfs/trunk/src/test/org/apache/commons/vfs/RunTest.java?rev=169881&view=auto
==============================================================================
--- jakarta/commons/sandbox/vfs/trunk/src/test/org/apache/commons/vfs/RunTest.java (added)
+++ jakarta/commons/sandbox/vfs/trunk/src/test/org/apache/commons/vfs/RunTest.java Thu May 12 13:35:11 2005
@@ -0,0 +1,103 @@
+package org.apache.commons.vfs;
+
+import junit.framework.AssertionFailedError;
+import junit.framework.Test;
+import junit.framework.TestResult;
+import org.apache.commons.vfs.provider.ftp.test.FtpProviderTestCase;
+import org.apache.commons.vfs.provider.http.test.HttpProviderTestCase;
+import org.apache.commons.vfs.provider.jar.test.JarProviderTestCase;
+import org.apache.commons.vfs.provider.jar.test.NestedJarTestCase;
+import org.apache.commons.vfs.provider.local.test.LocalProviderTestCase;
+import org.apache.commons.vfs.provider.res.test.ResourceProviderTestCase;
+import org.apache.commons.vfs.provider.sftp.test.SftpProviderTestCase;
+import org.apache.commons.vfs.provider.smb.test.SmbProviderTestCase;
+import org.apache.commons.vfs.provider.tar.test.NestedTarTestCase;
+import org.apache.commons.vfs.provider.tar.test.NestedTbz2TestCase;
+import org.apache.commons.vfs.provider.tar.test.NestedTgzTestCase;
+import org.apache.commons.vfs.provider.tar.test.TarProviderTestCase;
+import org.apache.commons.vfs.provider.tar.test.Tbz2ProviderTestCase;
+import org.apache.commons.vfs.provider.tar.test.TgzProviderTestCase;
+import org.apache.commons.vfs.provider.temp.test.TemporaryProviderTestCase;
+import org.apache.commons.vfs.provider.test.VirtualProviderTestCase;
+import org.apache.commons.vfs.provider.url.test.UrlProviderTestCase;
+import org.apache.commons.vfs.provider.webdav.test.WebdavProviderTestCase;
+import org.apache.commons.vfs.provider.zip.test.NestedZipTestCase;
+import org.apache.commons.vfs.provider.zip.test.ZipProviderTestCase;
+
+import java.util.Properties;
+
+public class RunTest
+{
+    public static void main(String[] args) throws Exception
+    {
+        Properties props = System.getProperties();
+        props.setProperty("test.data.src", "src/test-data");
+        props.setProperty("test.basedir", "target/test-data");
+        props.setProperty("test.policy", "src/test-data/test.policy");
+        props.setProperty("test.secure", "false");
+        props.setProperty("test.smb.uri", "smb://vfsusr:vfsusr@10.0.1.54/vfsusr/vfstest");
+        props.setProperty("test.ftp.uri", "ftp://vfsusr:vfsusr@10.0.1.54/vfstest");
+        props.setProperty("test.http.uri", "http://10.0.1.54/vfstest");
+        props.setProperty("test.webdav.uri", "webdav://vfsusr:vfsusr@10.0.1.54/vfstest");
+        props.setProperty("test.sftp.uri", "sftp://vfsusr:vfsusr@10.0.1.54/vfstest");
+
+        Test tests[] = new Test[]
+        {
+            LocalProviderTestCase.suite(),
+            VirtualProviderTestCase.suite(),
+            TemporaryProviderTestCase.suite(),
+            UrlProviderTestCase.suite(),
+            ResourceProviderTestCase.suite(),
+
+            FtpProviderTestCase.suite(),
+            HttpProviderTestCase.suite(),
+            WebdavProviderTestCase.suite(),
+            SmbProviderTestCase.suite(),
+            SftpProviderTestCase.suite(),
+
+            JarProviderTestCase.suite(),
+            NestedJarTestCase.suite(),
+            ZipProviderTestCase.suite(),
+            NestedZipTestCase.suite(),
+            TarProviderTestCase.suite(),
+            TgzProviderTestCase.suite(),
+            Tbz2ProviderTestCase.suite(),
+            NestedTarTestCase.suite(),
+            NestedTgzTestCase.suite(),
+            NestedTbz2TestCase.suite(),
+        };
+
+        TestResult result = new TestResult()
+        {
+            public void startTest(Test test)
+            {
+                System.out.println("start " + test);
+                System.out.flush();
+            }
+
+            public void endTest(Test test)
+            {
+                // System.err.println("end " + test);
+            }
+
+            public synchronized void addError(Test test, Throwable throwable)
+            {
+                throwable.printStackTrace();
+            }
+
+            public synchronized void addFailure(Test test, AssertionFailedError assertionFailedError)
+            {
+                assertionFailedError.printStackTrace();
+            }
+        };
+
+        for (int i = 0; i < tests.length; i++)
+        {
+            System.out.println("start test#" + i);
+            System.out.flush();
+
+            Test test = tests[i];
+            test.run(result);
+        }
+    }
+}

Propchange: jakarta/commons/sandbox/vfs/trunk/src/test/org/apache/commons/vfs/RunTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jakarta/commons/sandbox/vfs/trunk/src/test/org/apache/commons/vfs/RunTest.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: jakarta/commons/sandbox/vfs/trunk/src/test/org/apache/commons/vfs/RunTest.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org