1 16 package org.apache.commons.vfs.test; 17 18 import org.apache.commons.AbstractVfsTestCase; 19 import org.apache.commons.vfs.FileObject; 20 import org.apache.commons.vfs.FileSystemManager; 21 import org.apache.commons.vfs.FileType; 22 import org.apache.commons.vfs.VFS; 23 24 import java.io.File ; 25 26 31 public class FileSystemManagerFactoryTestCase 32 extends AbstractVfsTestCase 33 { 34 37 public void testDefaultInstance() throws Exception 38 { 39 final FileSystemManager manager = VFS.getManager(); 41 42 final File jarFile = getTestResource("test.jar"); 44 FileObject file = manager.toFileObject(jarFile); 45 assertNotNull(file); 46 assertTrue(file.exists()); 47 assertSame(FileType.FILE, file.getType()); 48 49 file = manager.createFileSystem(file); 51 assertNotNull(file); 52 assertTrue(file.exists()); 53 assertSame(FileType.FOLDER, file.getType()); 54 } 55 56 } 57 | Popular Tags |