1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.apache.commons.vfs.provider.http.test;
18
19 import junit.framework.Test;
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.http.HttpFileProvider;
24 import org.apache.commons.vfs.test.AbstractProviderTestConfig;
25 import org.apache.commons.vfs.test.ProviderTestSuite;
26
27 /***
28 * Test cases for the HTTP provider.
29 *
30 * @author <a href="mailto:adammurdoch@apache.org">Adam Murdoch</a>
31 * @version $Revision: 480428 $ $Date: 2006-11-29 07:15:24 +0100 (Mi, 29 Nov 2006) $
32 */
33 public class HttpProviderTestCase
34 extends AbstractProviderTestConfig
35 {
36 public static Test suite() throws Exception
37 {
38 return new ProviderTestSuite(new HttpProviderTestCase());
39 }
40
41 /***
42 * Prepares the file system manager.
43 */
44 public void prepare(final DefaultFileSystemManager manager)
45 throws Exception
46 {
47 manager.addProvider("http", new HttpFileProvider());
48 }
49
50 /***
51 * Returns the base folder for tests.
52 */
53 public FileObject getBaseTestFolder(final FileSystemManager manager)
54 throws Exception
55 {
56 final String uri = System.getProperty("test.http.uri");
57 return manager.resolveFile(uri);
58 }
59 }