org.apache.commons.vfs2.test
Class ProviderWriteTests

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.apache.commons.AbstractVfsTestCase
              extended by org.apache.commons.vfs2.test.AbstractProviderTestCase
                  extended by org.apache.commons.vfs2.test.ProviderWriteTests
All Implemented Interfaces:
junit.framework.Test

public class ProviderWriteTests
extends AbstractProviderTestCase

File system test that check that a file system can be modified.

Author:
Adam Murdoch

Field Summary
 
Fields inherited from class org.apache.commons.vfs2.test.AbstractProviderTestCase
FILE1_CONTENT, TEST_FILE_CONTENT
 
Constructor Summary
ProviderWriteTests()
           
 
Method Summary
protected  FileObject createScratchFolder()
          Sets up a scratch folder for the test to use.
protected  Capability[] getRequiredCaps()
          Returns the capabilities required by the tests of this test case.
 void testCopySameFileSystem()
          Tests file copy to and from the same filesystem type.
 void testCreateDeleteCreateSameFileSystem()
          Tests create-delete-create-a-file sequence on the same file system.
 void testDelete()
          Tests deletion
 void testFileCreate()
          Tests file creation
 void testFileCreateMismatched()
          Tests file/folder creation with mismatched types.
 void testFolderCreate()
          Tests folder creation.
 void testListChildren()
          Test that children are handled correctly by create and delete.
 void testListener()
          Check listeners are notified of changes.
 void testOverwriteSameFileSystem()
          Tests overwriting a file on the same file system.
 
Methods inherited from class org.apache.commons.vfs2.test.AbstractProviderTestCase
addEmptyDir, assertSameContent, assertSameURLContent, buildExpectedStructure, createManager, getBaseFolder, getBaseTestFolder, getManager, getProviderConfig, getReadFolder, getWriteFolder, notConfigured, runTest, setConfig, setMethod, setWriteFolder
 
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
 

Constructor Detail

ProviderWriteTests

public ProviderWriteTests()
Method Detail

getRequiredCaps

protected Capability[] getRequiredCaps()
Returns the capabilities required by the tests of this test case.

Overrides:
getRequiredCaps in class AbstractProviderTestCase

createScratchFolder

protected FileObject createScratchFolder()
                                  throws Exception
Sets up a scratch folder for the test to use.

Throws:
Exception

testFolderCreate

public void testFolderCreate()
                      throws Exception
Tests folder creation.

Throws:
Exception

testFileCreate

public void testFileCreate()
                    throws Exception
Tests file creation

Throws:
Exception

testFileCreateMismatched

public void testFileCreateMismatched()
                              throws Exception
Tests file/folder creation with mismatched types.

Throws:
Exception

testDelete

public void testDelete()
                throws Exception
Tests deletion

Throws:
Exception

testCopySameFileSystem

public void testCopySameFileSystem()
                            throws Exception
Tests file copy to and from the same filesystem type. This was a problem w/ FTP.

Throws:
Exception

testOverwriteSameFileSystem

public void testOverwriteSameFileSystem()
                                 throws Exception
Tests overwriting a file on the same file system.

Throws:
Exception

testCreateDeleteCreateSameFileSystem

public void testCreateDeleteCreateSameFileSystem()
                                          throws Exception
Tests create-delete-create-a-file sequence on the same file system.

Throws:
Exception

testListChildren

public void testListChildren()
                      throws Exception
Test that children are handled correctly by create and delete.

Throws:
Exception

testListener

public void testListener()
                  throws Exception
Check listeners are notified of changes.

Throws:
Exception


Copyright © 2002-2011 The Apache Software Foundation. All Rights Reserved.