1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.apache.commons.vfs.provider.local.test;
18
19 import junit.framework.Test;
20 import org.apache.commons.AbstractVfsTestCase;
21 import org.apache.commons.vfs.FileObject;
22 import org.apache.commons.vfs.FileSystemManager;
23 import org.apache.commons.vfs.test.AbstractProviderTestConfig;
24 import org.apache.commons.vfs.test.ProviderTestConfig;
25 import org.apache.commons.vfs.test.ProviderTestSuite;
26
27 import java.io.File;
28
29 /***
30 * Tests for the local file system.
31 *
32 * @author <a href="mailto:adammurdoch@apache.org">Adam Murdoch</a>
33 */
34 public class LocalProviderTestCase
35 extends AbstractProviderTestConfig
36 implements ProviderTestConfig
37 {
38 /***
39 * Creates the test suite for the local file system.
40 */
41 public static Test suite() throws Exception
42 {
43 final ProviderTestSuite testSuite = new ProviderTestSuite(new LocalProviderTestCase());
44 testSuite.addTests(FileNameTests.class);
45 return testSuite;
46 }
47
48 /***
49 * Returns the base folder for tests.
50 */
51 public FileObject getBaseTestFolder(final FileSystemManager manager) throws Exception
52 {
53 final File testDir = AbstractVfsTestCase.getTestDirectoryFile();
54 return manager.toFileObject(testDir);
55 }
56 }