Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTomasz Zarna2014-04-02 10:42:21 +0000
committerTomasz Zarna2014-04-02 13:44:20 +0000
commit8d11feb00f475879348f560af4f51bb06a89a1bd (patch)
tree1b28987a6c7d0df1b75e4ccb7e91f45a205eeca3
parent867fc3833a4f31a7dedf88aa4bdb572b82fad922 (diff)
downloadorg.eclipse.mylyn.tasks-8d11feb00f475879348f560af4f51bb06a89a1bd.tar.gz
org.eclipse.mylyn.tasks-8d11feb00f475879348f560af4f51bb06a89a1bd.tar.xz
org.eclipse.mylyn.tasks-8d11feb00f475879348f560af4f51bb06a89a1bd.zip
Fix a bunch of deprecation warnings in tests for Mylyn Tasks
Change-Id: I05e682d2338794f80150ea7fd820815ad3ec7deb Signed-off-by: Tomasz Zarna <tomasz.zarna@tasktop.com>
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/ProjectRepositoryAssociationTest.java8
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskActivationHistoryTest.java9
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskPlanningEditorTest.java2
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskRepositoryManagerTest.java2
4 files changed, 9 insertions, 12 deletions
diff --git a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/ProjectRepositoryAssociationTest.java b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/ProjectRepositoryAssociationTest.java
index b52cdfc7d..f684dcb87 100644
--- a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/ProjectRepositoryAssociationTest.java
+++ b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/ProjectRepositoryAssociationTest.java
@@ -41,7 +41,7 @@ public class ProjectRepositoryAssociationTest extends TestCase {
protected void tearDown() throws Exception {
super.tearDown();
ResourceTestUtil.deleteProject(projectWrapper.getProject());
- TasksUiPlugin.getRepositoryManager().clearRepositories(TasksUiPlugin.getDefault().getRepositoriesFilePath());
+ TasksUiPlugin.getRepositoryManager().clearRepositories();
}
public void testRepositoryForProject() throws CoreException {
@@ -55,8 +55,7 @@ public class ProjectRepositoryAssociationTest extends TestCase {
assertEquals(REPOSITORY_KIND, returnedRepository.getConnectorKind());
assertEquals(REPOSITORY_URL, returnedRepository.getRepositoryUrl());
- TasksUiPlugin.getRepositoryManager().removeRepository(repository,
- TasksUiPlugin.getDefault().getRepositoriesFilePath());
+ TasksUiPlugin.getRepositoryManager().removeRepository(repository);
}
public void testRepositoryForFolder() throws CoreException {
@@ -71,7 +70,6 @@ public class ProjectRepositoryAssociationTest extends TestCase {
assertEquals(REPOSITORY_KIND, returnedRepository.getConnectorKind());
assertEquals(REPOSITORY_URL, returnedRepository.getRepositoryUrl());
- TasksUiPlugin.getRepositoryManager().removeRepository(repository,
- TasksUiPlugin.getDefault().getRepositoriesFilePath());
+ TasksUiPlugin.getRepositoryManager().removeRepository(repository);
}
}
diff --git a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskActivationHistoryTest.java b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskActivationHistoryTest.java
index c01a491e8..1906cb511 100644
--- a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskActivationHistoryTest.java
+++ b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskActivationHistoryTest.java
@@ -26,7 +26,6 @@ import org.eclipse.mylyn.internal.tasks.core.TaskActivityManager;
import org.eclipse.mylyn.internal.tasks.core.TaskList;
import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
import org.eclipse.mylyn.internal.tasks.ui.actions.ActivateTaskHistoryDropDownAction;
-import org.eclipse.mylyn.internal.tasks.ui.actions.TaskActivateAction;
import org.eclipse.mylyn.internal.tasks.ui.util.TasksUiInternal;
import org.eclipse.mylyn.internal.tasks.ui.workingsets.TaskWorkingSetUpdater;
import org.eclipse.mylyn.tasks.tests.connector.MockRepositoryQuery;
@@ -102,17 +101,17 @@ public class TaskActivationHistoryTest extends TestCase {
taskList.addQuery(query1);
taskList.addQuery(query2);
createWorkingSet(query1);
- (new TaskActivateAction()).run(task11);
+ TasksUi.getTaskActivityManager().activateTask(task11);
history.addTask(task11);
taskList.addTask(task11, query1);
- (new TaskActivateAction()).run(task12);
+ TasksUi.getTaskActivityManager().activateTask(task12);
history.addTask(task12);
taskList.addTask(task12, query1);
- (new TaskActivateAction()).run(task21);
+ TasksUi.getTaskActivityManager().activateTask(task21);
history.addTask(task21);
taskList.addTask(task21, query2);
- (new TaskActivateAction()).run(task22);
+ TasksUi.getTaskActivityManager().activateTask(task22);
history.addTask(task22);
taskList.addTask(task22, query2);
diff --git a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskPlanningEditorTest.java b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskPlanningEditorTest.java
index ea4f8600a..d0dc58f87 100644
--- a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskPlanningEditorTest.java
+++ b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskPlanningEditorTest.java
@@ -36,7 +36,7 @@ public class TaskPlanningEditorTest extends TestCase {
@Override
protected void tearDown() throws Exception {
PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().closeAllEditors(false);
- TasksUiPlugin.getRepositoryManager().clearRepositories(TasksUiPlugin.getDefault().getRepositoriesFilePath());
+ TasksUiPlugin.getRepositoryManager().clearRepositories();
TaskTestUtil.resetTaskList();
}
diff --git a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskRepositoryManagerTest.java b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskRepositoryManagerTest.java
index cd5880d4a..535ee15f5 100644
--- a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskRepositoryManagerTest.java
+++ b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskRepositoryManagerTest.java
@@ -350,7 +350,7 @@ public class TaskRepositoryManagerTest extends TestCase {
manager.addRepository(repository2);
assertNotNull(manager.getRepository(repository2.getConnectorKind(), repository2.getRepositoryUrl()));
- manager.removeRepository(repository2, TasksUiPlugin.getDefault().getRepositoriesFilePath());
+ manager.removeRepository(repository2);
assertNull(manager.getRepository(repository2.getConnectorKind(), repository2.getRepositoryUrl()));
}

Back to the top