Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'org.eclipse.mylyn.tasks.tests')
-rw-r--r--org.eclipse.mylyn.tasks.tests/META-INF/MANIFEST.MF3
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskTestUtil.java23
2 files changed, 8 insertions, 18 deletions
diff --git a/org.eclipse.mylyn.tasks.tests/META-INF/MANIFEST.MF b/org.eclipse.mylyn.tasks.tests/META-INF/MANIFEST.MF
index ca57647de..2e13b8cc5 100644
--- a/org.eclipse.mylyn.tasks.tests/META-INF/MANIFEST.MF
+++ b/org.eclipse.mylyn.tasks.tests/META-INF/MANIFEST.MF
@@ -30,7 +30,8 @@ Require-Bundle: org.eclipse.core.runtime,
org.eclipse.mylyn.commons.tests,
org.eclipse.ui.browser,
org.eclipse.core.expressions,
- org.eclipse.equinox.security
+ org.eclipse.equinox.security,
+ org.eclipse.mylyn.tests.util
Bundle-ActivationPolicy: lazy
Bundle-ClassPath: mylyn-tasklist-tests.jar
Export-Package: org.eclipse.mylyn.tasks.tests;x-internal:=true,
diff --git a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskTestUtil.java b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskTestUtil.java
index 6f7c1527b..270dc22a8 100644
--- a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskTestUtil.java
+++ b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskTestUtil.java
@@ -29,7 +29,7 @@ import org.eclipse.mylyn.tasks.core.data.TaskAttributeMapper;
import org.eclipse.mylyn.tasks.core.data.TaskData;
import org.eclipse.mylyn.tasks.tests.connector.MockRepositoryConnector;
import org.eclipse.mylyn.tasks.ui.ITasksUiConstants;
-import org.eclipse.mylyn.tasks.ui.TasksUi;
+import org.eclipse.mylyn.tests.util.TestFixture;
import org.eclipse.ui.IViewPart;
import org.eclipse.ui.IWorkbenchPart;
import org.eclipse.ui.PlatformUI;
@@ -66,36 +66,25 @@ public class TaskTestUtil {
* list will only have default categories but no tasks.
*/
public static void resetTaskListAndRepositories() throws Exception {
- TasksUiPlugin.getRepositoryManager().clearRepositories(TasksUiPlugin.getDefault().getRepositoriesFilePath());
- TasksUiPlugin.getDefault().getLocalTaskRepository();
- resetTaskList();
+ TestFixture.resetTaskListAndRepositories();
}
/**
* Clears all tasks.
*/
public static void resetTaskList() throws Exception {
- TasksUi.getTaskActivityManager().deactivateActiveTask();
- TasksUiPlugin.getTaskListExternalizationParticipant().resetTaskList();
- TasksUiPlugin.getTaskActivityManager().getTaskActivationHistory().clear();
- TaskListView view = TaskListView.getFromActivePerspective();
- if (view != null) {
- view.refresh();
- }
+ TestFixture.resetTaskList();
}
/**
* @see #resetTaskList()
*/
public static void saveAndReadTasklist() throws Exception {
- TasksUiPlugin.getTaskList().notifyElementsChanged(null);
- saveNow();
- TaskTestUtil.resetTaskList();
- TasksUiPlugin.getDefault().initializeDataSources();
+ TestFixture.saveAndReadTasklist();
}
- public static void saveNow() throws InterruptedException {
- TasksUiPlugin.getExternalizationManager().saveNow();
+ public static void saveNow() throws Exception {
+ TestFixture.saveNow();
}
public static TaskRepository createMockRepository() {

Back to the top