Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormkersten2005-12-10 03:37:47 +0000
committermkersten2005-12-10 03:37:47 +0000
commitd521af257a07fb9dabe2dcd3820e458458d5b5f9 (patch)
treefd9046921d6bd6bc52ba2a873c9b2d82f05c6e51 /org.eclipse.mylyn.tasks.tests/src
parent8544ffc58c3a40482ba93e2508353554b10b4f27 (diff)
downloadorg.eclipse.mylyn.tasks-d521af257a07fb9dabe2dcd3820e458458d5b5f9.tar.gz
org.eclipse.mylyn.tasks-d521af257a07fb9dabe2dcd3820e458458d5b5f9.tar.xz
org.eclipse.mylyn.tasks-d521af257a07fb9dabe2dcd3820e458458d5b5f9.zip
Progress on: fix schitzophrenia between task context paths and handle identifiers
Diffstat (limited to 'org.eclipse.mylyn.tasks.tests/src')
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasklist/tests/TaskDataExportTest.java14
1 files changed, 8 insertions, 6 deletions
diff --git a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasklist/tests/TaskDataExportTest.java b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasklist/tests/TaskDataExportTest.java
index 1e76877b2..78a2f03f5 100644
--- a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasklist/tests/TaskDataExportTest.java
+++ b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasklist/tests/TaskDataExportTest.java
@@ -47,15 +47,16 @@ public class TaskDataExportTest extends TestCase{
//Create a task and context with an interaction event to be saved
task1 = new Task(MylarTaskListPlugin.getTaskListManager().genUniqueTaskHandle(), "Export Test Task", true);
manager.moveToRoot(task1);
- MylarContext mockContext = MylarPlugin.getContextManager().loadContext(task1.getHandleIdentifier(), task1.getContextPath());
+ MylarContext mockContext = MylarPlugin.getContextManager().loadContext(task1.getHandleIdentifier());
InteractionEvent event = new InteractionEvent(InteractionEvent.Kind.EDIT,"structureKind","handle","originId");
mockContext.parseEvent(event);
MylarPlugin.getContextManager().contextActivated(mockContext);
//Save the context file and check that it exists
- MylarPlugin.getContextManager().saveContext(mockContext.getId(), task1.getContextPath());
- File taskFile = new File(MylarPlugin.getDefault().getDataDirectory() + File.separator + task1.getContextPath() + MylarContextManager.CONTEXT_FILE_EXTENSION);
- assertTrue(MylarPlugin.getContextManager().hasContext(task1.getContextPath()));
+ MylarPlugin.getContextManager().saveContext(mockContext.getId());
+ File taskFile = MylarPlugin.getContextManager().getFileForContext(task1.getHandleIdentifier());
+// new File(MylarPlugin.getDefault().getDataDirectory() + File.separator + task1.getContextPath() + MylarContextManager.CONTEXT_FILE_EXTENSION);
+ assertTrue(MylarPlugin.getContextManager().hasContext(task1.getHandleIdentifier()));
assertTrue(taskFile.exists());
}
@@ -68,7 +69,7 @@ public class TaskDataExportTest extends TestCase{
//Check that the task list file was exported
File destZipFile = new File(destinationDir + File.separator
- + TaskDataExportWizard.ZIP_FILE_NAME);
+ + TaskDataExportWizard.getZipFileName());
assertTrue(destZipFile.exists());
}
@@ -92,7 +93,8 @@ public class TaskDataExportTest extends TestCase{
assertTrue(destActivationHistoryFile.exists());
//Check that the task context file created in setUp() was exported
- File destTaskContextFile = new File(destinationDir + File.separator + task1.getContextPath() + MylarContextManager.CONTEXT_FILE_EXTENSION);
+ File destTaskContextFile = MylarPlugin.getContextManager().getFileForContext(task1.getHandleIdentifier());
+// File destTaskContextFile = new File(destinationDir + File.separator + task1.getContextPath() + MylarContextManager.CONTEXT_FILE_EXTENSION);
assertTrue(destTaskContextFile.exists());
}

Back to the top