|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjunit.framework.Assert
junit.framework.TestCase
org.apache.commons.AbstractVfsTestCase
org.apache.commons.vfs2.test.AbstractProviderTestCase
public abstract class AbstractProviderTestCase
File system test cases, which verifies the structure and naming functionality.
Works from a base folder, and assumes a particular structure under that base folder.
| Field Summary | |
|---|---|
static String |
FILE1_CONTENT
|
static String |
TEST_FILE_CONTENT
|
| Constructor Summary | |
|---|---|
AbstractProviderTestCase()
|
|
| Method Summary | |
|---|---|
protected void |
addEmptyDir(boolean addEmptyDir)
|
protected void |
assertSameContent(String expected,
FileObject file)
Asserts that the content of a file is the same as expected. |
protected void |
assertSameURLContent(String expected,
URLConnection connection)
Asserts that the content of a file is the same as expected. |
protected org.apache.commons.vfs2.test.FileInfo |
buildExpectedStructure()
Builds the expected structure of the read tests folder. |
protected DefaultFileSystemManager |
createManager()
creates a new uninitialized file system manager |
FileObject |
getBaseFolder()
Returns the base test folder. |
FileObject |
getBaseTestFolder(FileSystemManager fs)
some provider config do some post-initialization in getBaseTestFolder. |
protected DefaultFileSystemManager |
getManager()
Returns the file system manager used by this test. |
ProviderTestConfig |
getProviderConfig()
get the provider configuration |
protected FileObject |
getReadFolder()
Returns the read test folder. |
protected Capability[] |
getRequiredCaps()
Returns the capabilities required by the tests of this test case. |
protected FileObject |
getWriteFolder()
Returns the write test folder. |
protected static junit.framework.Test |
notConfigured(Class<?> testClass)
|
protected void |
runTest()
Runs the test. |
void |
setConfig(DefaultFileSystemManager manager,
ProviderTestConfig providerConfig,
FileObject baseFolder,
FileObject readFolder,
FileObject writeFolder)
Configures this test. |
void |
setMethod(Method method)
Sets the test method. |
protected void |
setWriteFolder(FileObject folder)
Sets the write test folder. |
| Methods inherited from class org.apache.commons.AbstractVfsTestCase |
|---|
assertSameMessage, assertSameMessage, assertSameMessage, assertSameMessage, equals, getCanonicalFile, getCause, getPackageName, getResourceTestDirectory, getTestDirectory, getTestDirectory, getTestDirectoryFile, getTestResource, getTestResource |
| Methods inherited from class junit.framework.TestCase |
|---|
countTestCases, createResult, getName, run, run, runBare, setName, setUp, tearDown, toString |
| Methods inherited from class junit.framework.Assert |
|---|
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail, failNotEquals, failNotSame, failSame, format |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final String FILE1_CONTENT
public static final String TEST_FILE_CONTENT
| Constructor Detail |
|---|
public AbstractProviderTestCase()
| Method Detail |
|---|
public void setMethod(Method method)
public void setConfig(DefaultFileSystemManager manager,
ProviderTestConfig providerConfig,
FileObject baseFolder,
FileObject readFolder,
FileObject writeFolder)
protected DefaultFileSystemManager getManager()
protected DefaultFileSystemManager createManager()
throws Exception
Exception
public FileObject getBaseTestFolder(FileSystemManager fs)
throws Exception
createManager
Exceptionpublic FileObject getBaseFolder()
public ProviderTestConfig getProviderConfig()
protected FileObject getReadFolder()
protected FileObject getWriteFolder()
protected void setWriteFolder(FileObject folder)
folder - protected Capability[] getRequiredCaps()
This implementation returns null.
protected void runTest()
throws Throwable
runTest in class junit.framework.TestCaseThrowable
protected void assertSameURLContent(String expected,
URLConnection connection)
throws Exception
Exception
protected void assertSameContent(String expected,
FileObject file)
throws Exception
Exception
protected org.apache.commons.vfs2.test.FileInfo buildExpectedStructure()
throws FileSystemException
FileSystemException - (possibly)protected void addEmptyDir(boolean addEmptyDir)
protected static junit.framework.Test notConfigured(Class<?> testClass)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||