Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKai Maetzel2004-10-19 16:34:05 +0000
committerKai Maetzel2004-10-19 16:34:05 +0000
commit6e7d4a52a4355aaf110b8547e8683f940abee032 (patch)
tree5a9573f4ca72c351ee1f2546b3e48e6b37d86604 /org.eclipse.core.filebuffers.tests
parentafef0527b038e0dfcab9e744d1e5fafdc4f7a353 (diff)
downloadeclipse.platform.text-6e7d4a52a4355aaf110b8547e8683f940abee032.tar.gz
eclipse.platform.text-6e7d4a52a4355aaf110b8547e8683f940abee032.tar.xz
eclipse.platform.text-6e7d4a52a4355aaf110b8547e8683f940abee032.zip
speed up tests
Diffstat (limited to 'org.eclipse.core.filebuffers.tests')
-rw-r--r--org.eclipse.core.filebuffers.tests/src/org/eclipse/core/filebuffers/tests/FileBuffersForFilesInLinkedFolders.java18
1 files changed, 11 insertions, 7 deletions
diff --git a/org.eclipse.core.filebuffers.tests/src/org/eclipse/core/filebuffers/tests/FileBuffersForFilesInLinkedFolders.java b/org.eclipse.core.filebuffers.tests/src/org/eclipse/core/filebuffers/tests/FileBuffersForFilesInLinkedFolders.java
index b7304d446..01888fb09 100644
--- a/org.eclipse.core.filebuffers.tests/src/org/eclipse/core/filebuffers/tests/FileBuffersForFilesInLinkedFolders.java
+++ b/org.eclipse.core.filebuffers.tests/src/org/eclipse/core/filebuffers/tests/FileBuffersForFilesInLinkedFolders.java
@@ -31,7 +31,7 @@ import org.osgi.framework.Bundle;
*/
public class FileBuffersForFilesInLinkedFolders extends FileBufferFunctions {
- private File fExternalDir;
+ private File fExternalFile;
/*
* @see org.eclipse.core.filebuffers.tests.FileBufferFunctions#tearDown()
@@ -39,7 +39,12 @@ public class FileBuffersForFilesInLinkedFolders extends FileBufferFunctions {
protected void tearDown() throws Exception {
File file= FileBuffers.getSystemFileAtLocation(getPath());
FileTool.delete(file);
- FileTool.delete(fExternalDir);
+ file= fExternalFile;
+ FileTool.delete(file); // externalResources/linkedFolderTarget/FileInLinkedFolder
+ file= file.getParentFile();
+ FileTool.delete(file); // externalResources/linkedFolderTarget
+ file= file.getParentFile();
+ FileTool.delete(file); // externalResources/
super.tearDown();
}
@@ -47,12 +52,11 @@ public class FileBuffersForFilesInLinkedFolders extends FileBufferFunctions {
* @see org.eclipse.core.filebuffers.tests.FileBufferFunctions#createPath(org.eclipse.core.resources.IProject)
*/
protected IPath createPath(IProject project) throws Exception {
- File sourceDir= FileTool.getFileInPlugin(FileBuffersTestPlugin.getDefault(), new Path("testResources/linkedFolderTarget"));
- fExternalDir= FileTool.createTempFileInPlugin(FileBuffersTestPlugin.getDefault(), new Path("externalResources/linkedFolderTarget"));
- fExternalDir.mkdirs();
- FileTool.copy(sourceDir, fExternalDir);
+ File sourceFile= FileTool.getFileInPlugin(FileBuffersTestPlugin.getDefault(), new Path("testResources/linkedFolderTarget/FileInLinkedFolder"));
+ fExternalFile= FileTool.createTempFileInPlugin(FileBuffersTestPlugin.getDefault(), new Path("externalResources/linkedFolderTarget/FileInLinkedFolder"));
+ FileTool.copy(sourceFile, fExternalFile);
- IFolder folder= ResourceHelper.createLinkedFolder(project, new Path("LinkedFolder"), fExternalDir);
+ IFolder folder= ResourceHelper.createLinkedFolder(project, new Path("LinkedFolder"), fExternalFile.getParentFile());
IFile file= folder.getFile(new Path("FileInLinkedFolder"));
return file.getFullPath();
}

Back to the top