1 16 package org.apache.commons.vfs.provider.tar.test; 17 18 import junit.framework.Test; 19 import org.apache.commons.AbstractVfsTestCase; 20 import org.apache.commons.vfs.FileObject; 21 import org.apache.commons.vfs.FileSystemManager; 22 import org.apache.commons.vfs.impl.DefaultFileSystemManager; 23 import org.apache.commons.vfs.provider.tar.TarFileProvider; 24 import org.apache.commons.vfs.test.AbstractProviderTestConfig; 25 import org.apache.commons.vfs.test.ProviderTestConfig; 26 import org.apache.commons.vfs.test.ProviderTestSuite; 27 28 import java.io.File ; 29 30 33 public class Tbz2ProviderTestCase 34 extends AbstractProviderTestConfig 35 implements ProviderTestConfig 36 { 37 40 public static Test suite() throws Exception 41 { 42 return new ProviderTestSuite(new Tbz2ProviderTestCase()); 43 } 44 45 48 public void prepare(final DefaultFileSystemManager manager) throws Exception 49 { 50 manager.addProvider("tbz2", new TarFileProvider()); 51 manager.addProvider("tar", new TarFileProvider()); 52 } 53 54 57 public FileObject getBaseTestFolder(final FileSystemManager manager) throws Exception 58 { 59 final File tarFile = AbstractVfsTestCase.getTestResource("test.tbz2"); 60 final String uri = "tbz2:" + tarFile.getAbsolutePath() + "!/"; 61 return manager.resolveFile(uri); 62 } 63 } 64 | Popular Tags |