Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormkersten2007-06-13 04:00:39 -0400
committermkersten2007-06-13 04:00:39 -0400
commit883219bedc7c4bd2ae6ceede524c9cb3abdd4e00 (patch)
treed0a0f6bb45193a3314d824367b6b6f81014d288d /org.eclipse.mylyn.trac.tests
parentf2fb9bb4cd1e7b9906b9cccc96ba519f116c975a (diff)
downloadorg.eclipse.mylyn.tasks-883219bedc7c4bd2ae6ceede524c9cb3abdd4e00.tar.gz
org.eclipse.mylyn.tasks-883219bedc7c4bd2ae6ceede524c9cb3abdd4e00.tar.xz
org.eclipse.mylyn.tasks-883219bedc7c4bd2ae6ceede524c9cb3abdd4e00.zip
NEW - bug 124321: [api] merge local tasks with repository tasks
https://bugs.eclipse.org/bugs/show_bug.cgi?id=124321
Diffstat (limited to 'org.eclipse.mylyn.trac.tests')
-rw-r--r--org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/RepositorySearchQueryTest.java4
-rw-r--r--org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracRepositoryConnectorTest.java12
-rw-r--r--org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracTaskDataHandlerTest.java10
3 files changed, 13 insertions, 13 deletions
diff --git a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/RepositorySearchQueryTest.java b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/RepositorySearchQueryTest.java
index 9e9b85e53..af318c588 100644
--- a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/RepositorySearchQueryTest.java
+++ b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/RepositorySearchQueryTest.java
@@ -22,7 +22,7 @@ import org.eclipse.mylyn.internal.trac.core.TracCorePlugin;
import org.eclipse.mylyn.internal.trac.core.TracRepositoryQuery;
import org.eclipse.mylyn.internal.trac.core.ITracClient.Version;
import org.eclipse.mylyn.internal.trac.core.model.TracSearch;
-import org.eclipse.mylyn.tasks.core.AbstractRepositoryTask;
+import org.eclipse.mylyn.tasks.core.AbstractTask;
import org.eclipse.mylyn.tasks.core.TaskRepository;
import org.eclipse.mylyn.tasks.core.TaskRepositoryManager;
import org.eclipse.mylyn.tasks.ui.TaskFactory;
@@ -81,7 +81,7 @@ public class RepositorySearchQueryTest extends TestCase {
.getTaskList(), repository, query, new TaskFactory(repository));
collector.run(new NullProgressMonitor());
- for (AbstractRepositoryTask task : collector.getTaskHits()) {
+ for (AbstractTask task : collector.getTaskHits()) {
assertEquals(TracTestConstants.TEST_TRAC_096_URL, task.getRepositoryUrl());
}
assertEquals(data.tickets.size(), collector.getTaskHits().size());
diff --git a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracRepositoryConnectorTest.java b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracRepositoryConnectorTest.java
index f64676e79..8e04b1a88 100644
--- a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracRepositoryConnectorTest.java
+++ b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracRepositoryConnectorTest.java
@@ -42,8 +42,8 @@ import org.eclipse.mylyn.internal.trac.core.model.TracVersion;
import org.eclipse.mylyn.internal.trac.core.model.TracTicket.Key;
import org.eclipse.mylyn.internal.trac.ui.wizard.TracRepositorySettingsPage;
import org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector;
-import org.eclipse.mylyn.tasks.core.AbstractRepositoryTask;
-import org.eclipse.mylyn.tasks.core.ITask;
+import org.eclipse.mylyn.tasks.core.AbstractTask;
+import org.eclipse.mylyn.tasks.core.AbstractTask;
import org.eclipse.mylyn.tasks.core.QueryHitCollector;
import org.eclipse.mylyn.tasks.core.RepositoryTaskData;
import org.eclipse.mylyn.tasks.core.TaskRepository;
@@ -139,7 +139,7 @@ public class TracRepositoryConnectorTest extends TestCase {
protected void createTaskFromExistingKey() throws CoreException {
String id = data.tickets.get(0).getId() + "";
- ITask task = connector.createTaskFromExistingId(repository, id, new NullProgressMonitor());
+ AbstractTask task = connector.createTaskFromExistingId(repository, id, new NullProgressMonitor());
assertNotNull(task);
assertEquals(TracTask.class, task.getClass());
assertTrue(task.getSummary().contains("summary1"));
@@ -209,13 +209,13 @@ public class TracRepositoryConnectorTest extends TestCase {
TracRepositoryQuery query = new TracRepositoryQuery(url, queryUrl, "description");
//MultiStatus queryStatus = new MultiStatus(TracUiPlugin.PLUGIN_ID, IStatus.OK, "Query result", null);
- final List<AbstractRepositoryTask> result = new ArrayList<AbstractRepositoryTask>();
+ final List<AbstractTask> result = new ArrayList<AbstractTask>();
QueryHitCollector hitCollector = new QueryHitCollector(TasksUiPlugin.getTaskListManager().getTaskList(), new TaskFactory(repository)) {
public void accept(RepositoryTaskData data) {
fail("Unexpected call to accept()");
}
@Override
- public void accept(AbstractRepositoryTask hit) {
+ public void accept(AbstractTask hit) {
result.add(hit);
}};
IStatus queryStatus = connector.performQuery(query, repository, new NullProgressMonitor(), hitCollector, false);
@@ -261,7 +261,7 @@ public class TracRepositoryConnectorTest extends TestCase {
assertEquals("456", task.getTaskKey());
assertEquals("mysummary", task.getSummary());
assertEquals("P3", task.getPriority());
- assertEquals(AbstractRepositoryTask.DEFAULT_TASK_KIND, task.getTaskKind());
+ assertEquals(AbstractTask.DEFAULT_TASK_KIND, task.getTaskKind());
}
public void testUpdateAttributesWeb011() throws Exception {
diff --git a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracTaskDataHandlerTest.java b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracTaskDataHandlerTest.java
index a1633e388..5d238227e 100644
--- a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracTaskDataHandlerTest.java
+++ b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracTaskDataHandlerTest.java
@@ -28,7 +28,7 @@ import org.eclipse.mylyn.internal.trac.core.TracTask;
import org.eclipse.mylyn.internal.trac.core.ITracClient.Version;
import org.eclipse.mylyn.internal.trac.core.model.TracTicket;
import org.eclipse.mylyn.internal.trac.core.model.TracTicket.Key;
-import org.eclipse.mylyn.tasks.core.AbstractRepositoryTask;
+import org.eclipse.mylyn.tasks.core.AbstractTask;
import org.eclipse.mylyn.tasks.core.RepositoryTaskData;
import org.eclipse.mylyn.tasks.core.TaskRepository;
import org.eclipse.mylyn.tasks.core.TaskRepositoryManager;
@@ -81,11 +81,11 @@ public class TracTaskDataHandlerTest extends TestCase {
init(TracTestConstants.TEST_TRAC_096_URL, Version.TRAC_0_9);
TracTask task = (TracTask) connector.createTaskFromExistingId(repository, data.offlineHandlerTicketId + "", new NullProgressMonitor());
- Set<AbstractRepositoryTask> tasks = new HashSet<AbstractRepositoryTask>();
+ Set<AbstractTask> tasks = new HashSet<AbstractTask>();
tasks.add(task);
assertEquals(null, repository.getSyncTimeStamp());
- Set<AbstractRepositoryTask> result = connector.getChangedSinceLastSync(repository, tasks, new NullProgressMonitor());
+ Set<AbstractTask> result = connector.getChangedSinceLastSync(repository, tasks, new NullProgressMonitor());
assertEquals(tasks, result);
assertEquals(null, repository.getSyncTimeStamp());
@@ -111,11 +111,11 @@ public class TracTaskDataHandlerTest extends TestCase {
int lastModified = Integer.parseInt(taskData.getLastModified());
- Set<AbstractRepositoryTask> tasks = new HashSet<AbstractRepositoryTask>();
+ Set<AbstractTask> tasks = new HashSet<AbstractTask>();
tasks.add(task);
assertEquals(null, repository.getSyncTimeStamp());
- Set<AbstractRepositoryTask> result = connector.getChangedSinceLastSync(repository, tasks, new NullProgressMonitor());
+ Set<AbstractTask> result = connector.getChangedSinceLastSync(repository, tasks, new NullProgressMonitor());
assertEquals(tasks, result);
// always returns the ticket because time comparison mode is >=

Back to the top