org.eclipse.core.tests.resources
Class IFileTest

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.eclipse.core.tests.harness.CoreTest
              extended by org.eclipse.core.tests.resources.ResourceTest
                  extended by org.eclipse.core.tests.resources.IFileTest
All Implemented Interfaces:
junit.framework.Test

public class IFileTest
extends ResourceTest


Field Summary
static java.lang.String DOES_NOT_EXIST
           
static java.lang.String EXISTING
           
static java.lang.String LOCAL_ONLY
           
static java.lang.String OUT_OF_SYNC
           
static java.lang.String WORKSPACE_ONLY
           
 
Fields inherited from class org.eclipse.core.tests.resources.ResourceTest
deltaListener, PI_RESOURCES_TESTS
 
Fields inherited from class org.eclipse.core.tests.harness.CoreTest
PI_HARNESS
 
Constructor Summary
IFileTest()
           
IFileTest(java.lang.String name)
           
 
Method Summary
 boolean existsAndOpen(IContainer container)
          Returns true if the given container exists, and is open if applicable.
 void generateInterestingFiles(IContainer container)
          Creates some interesting files in the specified container.
 IFile[] interestingFiles()
          Returns some interesting files.
 IProject[] interestingProjects()
          Creates and returns some interesting projects
 java.io.InputStream[] interestingStreams()
          Returns some interesting input streams
 boolean outOfSync(IFile file)
          Returns true if the given file is out of sync from the local file system.
 void refreshFile(IFile file)
          Makes sure file requirements are met (out of sync, workspace only, etc).
 void refreshFiles()
          Makes sure file requirements are met (out of sync, workspace only, etc).
static junit.framework.Test suite()
          Sets up the test suite for this class
 void testAppendContents()
           
 void testAppendContents2()
           
 void testCreate()
          Performs black box testing of the following method: void create(InputStream, boolean, IProgressMonitor)
 void testCreateDerived()
           
 void testCreateDerivedTeamPrivate()
           
 void testCreateTeamPrivate()
           
 void testFileCreation()
           
 void testFileDeletion()
           
 void testFileEmptyDeletion()
           
 void testFileInFolderCreation()
           
 void testFileInFolderCreation1()
           
 void testFileInFolderCreation2()
           
 void testFileMove()
           
 void testFileOverFolder()
           
 void testGetContents()
          Performs black box testing of the following method: InputStream getContents()
 void testGetContents2()
           
 void testInvalidFileNames()
          Tests creation and manipulation of file names that are reserved on some platforms.
 void testSetContents1()
          Performs black box testing of the following method: void setContents(InputStream, boolean, IProgressMonitor)
 void testSetContents2()
           
 void testSetGetFolderPersistentProperty()
           
 
Methods inherited from class org.eclipse.core.tests.resources.ResourceTest
assertDoesNotExistInFileSystem, assertDoesNotExistInFileSystem, assertDoesNotExistInFileSystem, assertDoesNotExistInFileSystem, assertDoesNotExistInWorkspace, assertDoesNotExistInWorkspace, assertDoesNotExistInWorkspace, assertDoesNotExistInWorkspace, assertExistsInFileSystem, assertExistsInFileSystem, assertExistsInFileSystem, assertExistsInFileSystem, assertExistsInWorkspace, assertExistsInWorkspace, assertExistsInWorkspace, assertExistsInWorkspace, assertExistsInWorkspace, assertExistsInWorkspace, assertExistsInWorkspace, assertExistsInWorkspace, buildResources, buildResources, compareContent, createFileInFileSystem, createFileInFileSystem, createFileInFileSystem, createFileInFileSystem, createHierarchy, defineHierarchy, ensureDoesNotExistInFileSystem, ensureDoesNotExistInFileSystem, ensureDoesNotExistInWorkspace, ensureDoesNotExistInWorkspace, ensureExistsInFileSystem, ensureExistsInFileSystem, ensureExistsInFileSystem, ensureExistsInWorkspace, ensureExistsInWorkspace, ensureExistsInWorkspace, ensureExistsInWorkspace, ensureOutOfSync, getUniqueString, getWorkspace
 
Methods inherited from class org.eclipse.core.tests.harness.CoreTest
createFileInFileSystem, debug, fail, getContents, getContents, getMonitor, getRandomContents, getRandomLocation, getRandomString, getTempDir, log, log, transferData, transferDataWithoutClose
 
Methods inherited from class junit.framework.TestCase
countTestCases, getName, run, run, runBare, setName, 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
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DOES_NOT_EXIST

public static final java.lang.String DOES_NOT_EXIST
See Also:
Constant Field Values

EXISTING

public static final java.lang.String EXISTING
See Also:
Constant Field Values

LOCAL_ONLY

public static final java.lang.String LOCAL_ONLY
See Also:
Constant Field Values

OUT_OF_SYNC

public static final java.lang.String OUT_OF_SYNC
See Also:
Constant Field Values

WORKSPACE_ONLY

public static final java.lang.String WORKSPACE_ONLY
See Also:
Constant Field Values
Constructor Detail

IFileTest

public IFileTest()

IFileTest

public IFileTest(java.lang.String name)
Method Detail

suite

public static junit.framework.Test suite()
Sets up the test suite for this class


existsAndOpen

public boolean existsAndOpen(IContainer container)
Returns true if the given container exists, and is open if applicable.


generateInterestingFiles

public void generateInterestingFiles(IContainer container)
Creates some interesting files in the specified container. Adds these files to the appropriate member ArrayLists. Conditions on these files (out of sync, workspace only, etc) will be ensured by refreshFiles


interestingFiles

public IFile[] interestingFiles()
Returns some interesting files. These files are created during setup.


interestingProjects

public IProject[] interestingProjects()
                               throws org.eclipse.core.runtime.CoreException
Creates and returns some interesting projects

Throws:
org.eclipse.core.runtime.CoreException

interestingStreams

public java.io.InputStream[] interestingStreams()
Returns some interesting input streams


outOfSync

public boolean outOfSync(IFile file)
Returns true if the given file is out of sync from the local file system. The file must exist in the workspace.


refreshFile

public void refreshFile(IFile file)
Makes sure file requirements are met (out of sync, workspace only, etc).


refreshFiles

public void refreshFiles()
Makes sure file requirements are met (out of sync, workspace only, etc).


testAppendContents

public void testAppendContents()

testAppendContents2

public void testAppendContents2()

testCreate

public void testCreate()
Performs black box testing of the following method: void create(InputStream, boolean, IProgressMonitor)


testCreateDerived

public void testCreateDerived()

testCreateDerivedTeamPrivate

public void testCreateDerivedTeamPrivate()

testCreateTeamPrivate

public void testCreateTeamPrivate()

testFileCreation

public void testFileCreation()

testFileDeletion

public void testFileDeletion()
                      throws java.lang.Throwable
Throws:
java.lang.Throwable

testFileEmptyDeletion

public void testFileEmptyDeletion()
                           throws java.lang.Throwable
Throws:
java.lang.Throwable

testFileInFolderCreation

public void testFileInFolderCreation()

testFileInFolderCreation1

public void testFileInFolderCreation1()
                               throws java.lang.Throwable
Throws:
java.lang.Throwable

testFileInFolderCreation2

public void testFileInFolderCreation2()

testFileMove

public void testFileMove()
                  throws java.lang.Throwable
Throws:
java.lang.Throwable

testFileOverFolder

public void testFileOverFolder()
                        throws java.lang.Throwable
Throws:
java.lang.Throwable

testGetContents

public void testGetContents()
Performs black box testing of the following method: InputStream getContents()


testGetContents2

public void testGetContents2()
                      throws java.io.IOException
Throws:
java.io.IOException

testInvalidFileNames

public void testInvalidFileNames()
Tests creation and manipulation of file names that are reserved on some platforms.


testSetContents1

public void testSetContents1()
Performs black box testing of the following method: void setContents(InputStream, boolean, IProgressMonitor)


testSetContents2

public void testSetContents2()

testSetGetFolderPersistentProperty

public void testSetGetFolderPersistentProperty()
                                        throws java.lang.Throwable
Throws:
java.lang.Throwable