commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From adammurd...@apache.org
Subject cvs commit: jakarta-commons-sandbox/vfs/src/test/org/apache/commons/vfs/provider/url/test UrlProviderTestCase.java
Date Mon, 25 Nov 2002 05:42:08 GMT
adammurdoch    2002/11/24 21:42:08

  Modified:    vfs/src/test/org/apache/commons/vfs/provider/url/test
                        UrlProviderTestCase.java
  Log:
  Use a file: URL instead of a jar: URL to test the generic provider.
  
  Revision  Changes    Path
  1.3       +6 -5      jakarta-commons-sandbox/vfs/src/test/org/apache/commons/vfs/provider/url/test/UrlProviderTestCase.java
  
  Index: UrlProviderTestCase.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/vfs/src/test/org/apache/commons/vfs/provider/url/test/UrlProviderTestCase.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- UrlProviderTestCase.java	23 Nov 2002 00:33:55 -0000	1.2
  +++ UrlProviderTestCase.java	25 Nov 2002 05:42:08 -0000	1.3
  @@ -63,6 +63,7 @@
   import org.apache.commons.vfs.FileSystemManager;
   import org.apache.commons.vfs.impl.DefaultFileSystemManager;
   import org.apache.commons.vfs.provider.url.UrlFileProvider;
  +import org.apache.commons.vfs.provider.jar.JarFileSystemProvider;
   import org.apache.commons.vfs.test.AbstractProviderTestConfig;
   import org.apache.commons.vfs.test.ProviderTestSuite;
   
  @@ -86,7 +87,8 @@
       public void prepare( final DefaultFileSystemManager manager )
           throws Exception
       {
  -        manager.addProvider( "jar", new UrlFileProvider() );
  +        manager.addProvider( "file", new UrlFileProvider() );
  +        manager.addProvider( "jar", new JarFileSystemProvider() );
       }
   
       /**
  @@ -95,9 +97,8 @@
       public FileObject getBaseTestFolder( final FileSystemManager manager )
           throws Exception
       {
  -        final File jarFile = AbstractVfsTestCase.getTestResource( "test.jar" );
  -        final String uri = "jar:" + jarFile.toURL().toExternalForm() + "!/";
  -        final URL url = new URL( uri );
  +        final File baseDir = AbstractVfsTestCase.getTestDirectory();
  +        final URL url = baseDir.toURL();
           return manager.resolveFile( url.toExternalForm() );
       }
   }
  
  
  

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


Mime
View raw message