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 2011/11/02 02:16:00 UTC

svn commit: r1196423 - /commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/util/DelegatingFileSystemOptionsBuilderTest.java

Author: ggregory
Date: Wed Nov  2 01:16:00 2011
New Revision: 1196423

URL: http://svn.apache.org/viewvc?rev=1196423&view=rev
Log:
Convert to JUnit 4.

Modified:
    commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/util/DelegatingFileSystemOptionsBuilderTest.java

Modified: commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/util/DelegatingFileSystemOptionsBuilderTest.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/util/DelegatingFileSystemOptionsBuilderTest.java?rev=1196423&r1=1196422&r2=1196423&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/util/DelegatingFileSystemOptionsBuilderTest.java (original)
+++ commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/util/DelegatingFileSystemOptionsBuilderTest.java Wed Nov  2 01:16:00 2011
@@ -16,31 +16,36 @@
  */
 package org.apache.commons.vfs2.util;
 
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
 import java.io.File;
 import java.lang.reflect.InvocationTargetException;
 
-import junit.framework.TestCase;
-
 import org.apache.commons.vfs2.FileSystemException;
 import org.apache.commons.vfs2.FileSystemOptions;
 import org.apache.commons.vfs2.impl.StandardFileSystemManager;
 import org.apache.commons.vfs2.provider.http.HttpFileSystemConfigBuilder;
 import org.apache.commons.vfs2.provider.sftp.SftpFileSystemConfigBuilder;
 import org.apache.commons.vfs2.provider.sftp.TrustEveryoneUserInfo;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
 
 /**
  * Some tests for the DelegatingFileSystemOptionsBuilder
  *
  * @author <a href="mailto:imario@apache.org">Mario Ivankovits</a>
  */
-public class DelegatingFileSystemOptionsBuilderTest extends TestCase
+public class DelegatingFileSystemOptionsBuilderTest
 {
     private StandardFileSystemManager fsm = null;
 
-    @Override
-    protected void setUp() throws Exception
+    @Before
+    public void setUp() throws Exception
     {
-        super.setUp();
 
         // get a full blown, fully functional manager
         fsm = new StandardFileSystemManager();
@@ -48,17 +53,16 @@ public class DelegatingFileSystemOptions
     }
 
 
-    @Override
-    protected void tearDown() throws Exception
+    @After
+    public void tearDown() throws Exception
     {
         if (fsm != null)
         {
             fsm.close();
         }
-
-        super.tearDown();
     }
 
+    @Test
     public void testDelegatingGood() throws Throwable
     {
         final String[] identityPaths = new String[]
@@ -90,6 +94,7 @@ public class DelegatingFileSystemOptions
         }
     }
 
+    @Test
     public void testDelegatingBad() throws Throwable
     {
         FileSystemOptions opts = new FileSystemOptions();
@@ -122,6 +127,7 @@ public class DelegatingFileSystemOptions
         "webdav", "http", "ftp", "file", "zip", "tar", "tgz", "bz2", "gz", "jar", "tmp", "ram"
     };
 
+    @Test
     public void testConfiguration() throws Exception
     {
         for (int i=0; i < schemes.length; ++i)