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/test NamingTests.java
Date Wed, 12 Feb 2003 07:44:17 GMT
adammurdoch    2003/02/11 23:44:17

  Modified:    vfs/src/test/org/apache/commons/vfs/test NamingTests.java
  Log:
  Added test case for finding the root file of a file system using an absolute URI.
  
  Revision  Changes    Path
  1.2       +13 -4     jakarta-commons-sandbox/vfs/src/test/org/apache/commons/vfs/test/NamingTests.java
  
  Index: NamingTests.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/vfs/src/test/org/apache/commons/vfs/test/NamingTests.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- NamingTests.java	23 Jan 2003 04:41:55 -0000	1.1
  +++ NamingTests.java	12 Feb 2003 07:44:16 -0000	1.2
  @@ -76,11 +76,20 @@
        */
       public void testAbsoluteURI() throws Exception
       {
  +        final FileObject readFolder = getReadFolder();
  +
           // Try fetching base folder again by its URI
  -        final String uri = getReadFolder().getName().getURI();
  -        final FileObject file = getManager().resolveFile( uri );
  +        final String uri = readFolder.getName().getURI();
  +        FileObject file = getManager().resolveFile( uri );
  +        assertSame( "file object", readFolder, file );
   
  -        assertSame( "file object", getReadFolder(), file );
  +        // Try fetching the filesystem root by its URI
  +        final String rootUri = readFolder.getName().getRootURI();
  +        file = getManager().resolveFile( rootUri );
  +        assertSame( readFolder.getFileSystem().getRoot(), file );
  +        assertEquals( rootUri, file.getName().getRootURI() );
  +        assertEquals( rootUri, file.getName().getURI() );
  +        assertEquals( FileName.ROOT_PATH, file.getName().getPath() );
       }
   
       /**
  
  
  

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


Mime
View raw message