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 TgzProviderTestCase 34 extends AbstractProviderTestConfig 35 implements ProviderTestConfig 36 { 37 40 public static Test suite() throws Exception 41 { 42 return new ProviderTestSuite(new TgzProviderTestCase()); 43 } 44 45 48 public void prepare(final DefaultFileSystemManager manager) throws Exception 49 { 50 manager.addProvider("tgz", new TarFileProvider()); 52 manager.addProvider("tar", new TarFileProvider()); 53 } 54 55 58 public FileObject getBaseTestFolder(final FileSystemManager manager) throws Exception 59 { 60 final File tarFile = AbstractVfsTestCase.getTestResource("test.tgz"); 61 final String uri = "tgz:" + tarFile.getAbsolutePath() + "!/"; 62 return manager.resolveFile(uri); 63 } 64 } 65 | Popular Tags |