org.eclipse.core.tests.resources
Class LinkedResourceWithPathVariableTest

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.LinkedResourceTest
                      extended by org.eclipse.core.tests.resources.LinkedResourceWithPathVariableTest
All Implemented Interfaces:
junit.framework.Test

public class LinkedResourceWithPathVariableTest
extends LinkedResourceTest

This class extends LinkedResourceTest in order to use randomly generated locations that are always variable-based. TODO: add tests specific to linking resources using path variables (then removing the variable, change the variable value, etc)


Field Summary
 
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
LinkedResourceWithPathVariableTest()
           
LinkedResourceWithPathVariableTest(java.lang.String name)
           
 
Method Summary
 org.eclipse.core.runtime.IPath getRandomLocation()
          Returns a unique location on disk.
static junit.framework.Test suite()
           
 void testFileVariableRemoved()
          Tests a scenario where a variable used in a linked file location is removed.
 void testFolderVariableRemoved()
          Tests a scenario where a variable used in a linked folder location is removed.
 void testImportWrongLineEndings_Bug210664()
          Tests importing a project with a Linked Resource and Path Variable, where the line endings in the .project file do not match the local Platform.
 void testUndefinedVariable()
          Tests scenario where links are relative to undefined variables
 void testVariableChanged()
          Tests a scenario where a variable used in a linked file location is changed.
 
Methods inherited from class org.eclipse.core.tests.resources.LinkedResourceTest
testAllowMissingLocal, testBlockedFolder, testChangeLinkGender, testCopyFile, testCopyFolder, testCopyMissingFile, testCopyMissingFolder, testCopyProjectWithLinks, testCreateFolderInBackground, testCreateHiddenLinkedResources, testCreateLinkCaseVariant, testCreateLinkInDotProject, testCreateProjectWithDeepLinks, testDeepMoveProjectWithLinks, testDeleteFolderWithLinks, testDeleteLinkParent, testDeleteProjectWithLinks, testFindFilesForLocationCaseVariant, testIsLinked, testLinkedFileInLinkedFolder, testLinkFile, testLinkFolder, testLocationWithColon, testModificationStamp, testMoveFile, testMoveFolder, testMoveMissingFile, testMoveMissingFolder, testMoveProjectWithLinks, testMoveProjectWithLinks2, testNatureVeto, testNestedLink, testRefreshDeepLink
 
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, 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
 

Constructor Detail

LinkedResourceWithPathVariableTest

public LinkedResourceWithPathVariableTest()

LinkedResourceWithPathVariableTest

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

suite

public static junit.framework.Test suite()

getRandomLocation

public org.eclipse.core.runtime.IPath getRandomLocation()
Description copied from class: CoreTest
Returns a unique location on disk. It is guaranteed that no file currently exists at that location. The returned location will be unique with respect to all other locations generated by this method in the current session. If the caller creates a folder or file at this location, they are responsible for deleting it when finished.

Overrides:
getRandomLocation in class CoreTest
See Also:
org.eclipse.core.tests.harness.ResourceTest#getRandomLocation()

testFileVariableRemoved

public void testFileVariableRemoved()
Tests a scenario where a variable used in a linked file location is removed.


testFolderVariableRemoved

public void testFolderVariableRemoved()
Tests a scenario where a variable used in a linked folder location is removed.


testImportWrongLineEndings_Bug210664

public void testImportWrongLineEndings_Bug210664()
                                          throws java.io.IOException
Tests importing a project with a Linked Resource and Path Variable, where the line endings in the .project file do not match the local Platform. The .project file must not be modified on import, especially if it is marked read-only. See Bug 210664.

Throws:
java.io.IOException

testUndefinedVariable

public void testUndefinedVariable()
Tests scenario where links are relative to undefined variables


testVariableChanged

public void testVariableChanged()
Tests a scenario where a variable used in a linked file location is changed.