Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormkersten2007-06-06 01:18:08 +0000
committermkersten2007-06-06 01:18:08 +0000
commit19494721a5cfb6d48754cc2a62110c96a3eca91a (patch)
tree15b199354b5ca6cdeab26c85acfa322e2f297c8f /org.eclipse.mylyn.bugzilla.tests
parent3f3239b0882f612ab39b7fd2522f3b03101f043b (diff)
downloadorg.eclipse.mylyn.tasks-19494721a5cfb6d48754cc2a62110c96a3eca91a.tar.gz
org.eclipse.mylyn.tasks-19494721a5cfb6d48754cc2a62110c96a3eca91a.tar.xz
org.eclipse.mylyn.tasks-19494721a5cfb6d48754cc2a62110c96a3eca91a.zip
NEW - bug 166609: [api] improve task externalization API
https://bugs.eclipse.org/bugs/show_bug.cgi?id=166609
Diffstat (limited to 'org.eclipse.mylyn.bugzilla.tests')
-rw-r--r--org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaRepositoryConnectorTest.java4
-rw-r--r--org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaTaskListManagerTest.java4
-rw-r--r--org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaTaskTest.java2
-rw-r--r--org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/RepositoryTaskHandleTest.java2
-rw-r--r--org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/TaskListNotificationManagerTest.java12
-rw-r--r--org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/TaskListStandaloneTest.java8
-rw-r--r--org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/TaskReportGeneratorTest.java14
7 files changed, 22 insertions, 24 deletions
diff --git a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaRepositoryConnectorTest.java b/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaRepositoryConnectorTest.java
index e6ee56a95..d62ea93b3 100644
--- a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaRepositoryConnectorTest.java
+++ b/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaRepositoryConnectorTest.java
@@ -243,13 +243,13 @@ public class BugzillaRepositoryConnectorTest extends AbstractBugzillaTest {
init222();
BugzillaRepositoryQuery query1 = new BugzillaRepositoryQuery(IBugzillaConstants.TEST_BUGZILLA_222_URL,
"queryurl", "description1", taskList);
- BugzillaTask query1Hit = new BugzillaTask(IBugzillaConstants.TEST_BUGZILLA_222_URL, "1", "description1", true);
+ BugzillaTask query1Hit = new BugzillaTask(IBugzillaConstants.TEST_BUGZILLA_222_URL, "1", "description1");
query1.addHit(query1Hit);
taskList.addQuery(query1);
BugzillaRepositoryQuery query2 = new BugzillaRepositoryQuery(IBugzillaConstants.TEST_BUGZILLA_222_URL,
"queryurl2", "description2", taskList);
- BugzillaTask query2Hit = new BugzillaTask(IBugzillaConstants.TEST_BUGZILLA_222_URL, "1", "description2", true);
+ BugzillaTask query2Hit = new BugzillaTask(IBugzillaConstants.TEST_BUGZILLA_222_URL, "1", "description2");
query2.addHit(query2Hit);
taskList.addQuery(query2);
assertEquals(2, taskList.getQueries().size());
diff --git a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaTaskListManagerTest.java b/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaTaskListManagerTest.java
index df923a3e9..bb0fcc6d2 100644
--- a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaTaskListManagerTest.java
+++ b/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaTaskListManagerTest.java
@@ -69,7 +69,7 @@ public class BugzillaTaskListManagerTest extends TestCase {
String bugNumber = "106939";
- BugzillaTask task1 = new BugzillaTask(repositoryUrl, bugNumber, "label", false);
+ BugzillaTask task1 = new BugzillaTask(repositoryUrl, bugNumber, "label");
manager.getTaskList().addTask(task1);
task1.setReminded(true);
@@ -89,7 +89,7 @@ public class BugzillaTaskListManagerTest extends TestCase {
}
public void testRepositoryTaskExternalization() {
- BugzillaTask repositoryTask = new BugzillaTask("repo", "1", "label", true);
+ BugzillaTask repositoryTask = new BugzillaTask("repo", "1", "label");
repositoryTask.setKind("kind");
manager.getTaskList().moveToRoot(repositoryTask);
manager.saveTaskList();
diff --git a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaTaskTest.java b/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaTaskTest.java
index 084b92825..0ac2812cb 100644
--- a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaTaskTest.java
+++ b/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaTaskTest.java
@@ -51,7 +51,7 @@ public class BugzillaTaskTest extends TestCase {
}
public void testCompletionDate() throws Exception {
- BugzillaTask task = new BugzillaTask("repo", "1", "summary", true);
+ BugzillaTask task = new BugzillaTask("repo", "1", "summary");
RepositoryTaskData taskData = new RepositoryTaskData(new BugzillaAttributeFactory(),
BugzillaCorePlugin.REPOSITORY_KIND, IBugzillaConstants.ECLIPSE_BUGZILLA_URL, "1", Task.DEFAULT_TASK_KIND);
diff --git a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/RepositoryTaskHandleTest.java b/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/RepositoryTaskHandleTest.java
index 2ee435fe0..ce96b9c81 100644
--- a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/RepositoryTaskHandleTest.java
+++ b/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/RepositoryTaskHandleTest.java
@@ -54,7 +54,7 @@ public class RepositoryTaskHandleTest extends TestCase {
String repository = IBugzillaConstants.ECLIPSE_BUGZILLA_URL;
String id = "123";
- BugzillaTask bugTask = new BugzillaTask(repository, id, "label 124", true);
+ BugzillaTask bugTask = new BugzillaTask(repository, id, "label 124");
assertEquals(repository, bugTask.getRepositoryUrl());
manager.getTaskList().moveToRoot(bugTask);
diff --git a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/TaskListNotificationManagerTest.java b/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/TaskListNotificationManagerTest.java
index b40903aff..481af7b69 100644
--- a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/TaskListNotificationManagerTest.java
+++ b/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/TaskListNotificationManagerTest.java
@@ -46,9 +46,9 @@ public class TaskListNotificationManagerTest extends TestCase {
Date now = new Date();
- ITask task0 = new Task("t0", "t0 - test 0", true);
- ITask task1 = new Task("t1", "t1 - test 1", true);
- ITask task2 = new Task("t2", "t2 - test 2", true);
+ ITask task0 = new Task("t0", "t0 - test 0");
+ ITask task1 = new Task("t1", "t1 - test 1");
+ ITask task2 = new Task("t2", "t2 - test 2");
task0.setScheduledForDate(new Date(now.getTime() - 2000));
task1.setScheduledForDate(new Date(now.getTime() - 2000));
@@ -78,7 +78,7 @@ public class TaskListNotificationManagerTest extends TestCase {
TaskRepository repository = new TaskRepository("bugzilla", "https://bugs.eclipse.org/bugs");
TasksUiPlugin.getRepositoryManager().addRepository(repository,
TasksUiPlugin.getDefault().getRepositoriesFilePath());
- AbstractRepositoryTask task = new BugzillaTask("https://bugs.eclipse.org/bugs", "142891", "label", true);
+ AbstractRepositoryTask task = new BugzillaTask("https://bugs.eclipse.org/bugs", "142891", "label");
assertTrue(task.getSyncState() == RepositoryTaskSyncState.INCOMING);
assertFalse(task.isNotified());
task.setNotified(false);
@@ -93,7 +93,7 @@ public class TaskListNotificationManagerTest extends TestCase {
}
public void testTaskListNotificationQueryIncoming() {
- BugzillaTask hit = new BugzillaTask("https://bugs.eclipse.org/bugs", "1", "summary", true);
+ BugzillaTask hit = new BugzillaTask("https://bugs.eclipse.org/bugs", "1", "summary");
assertFalse(hit.isNotified());
BugzillaRepositoryQuery query = new BugzillaRepositoryQuery("https://bugs.eclipse.org/bugs", "queryUrl",
"summary", TasksUiPlugin.getTaskListManager().getTaskList());
@@ -111,7 +111,7 @@ public class TaskListNotificationManagerTest extends TestCase {
public void testTaskListNotificationQueryIncomingRepeats() {
TasksUiPlugin.getTaskListManager().resetTaskList();
- BugzillaTask hit = new BugzillaTask("https://bugs.eclipse.org/bugs", "1", "summary", true);
+ BugzillaTask hit = new BugzillaTask("https://bugs.eclipse.org/bugs", "1", "summary");
String hitHandle = hit.getHandleIdentifier();
assertFalse(hit.isNotified());
BugzillaRepositoryQuery query = new BugzillaRepositoryQuery("https://bugs.eclipse.org/bugs", "queryUrl",
diff --git a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/TaskListStandaloneTest.java b/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/TaskListStandaloneTest.java
index 166f0a066..77b361361 100644
--- a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/TaskListStandaloneTest.java
+++ b/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/TaskListStandaloneTest.java
@@ -59,7 +59,7 @@ public class TaskListStandaloneTest extends TestCase {
}
public void testDueDateExternalization() {
- ITask task = new Task("1", "task 1", true);
+ ITask task = new Task("1", "task 1");
Date dueDate = new Date();
task.setDueDate(dueDate);
manager.getTaskList().moveToRoot(task);
@@ -76,7 +76,7 @@ public class TaskListStandaloneTest extends TestCase {
}
public void testPastReminder() {
- ITask task = new Task("1", "1", true);
+ ITask task = new Task("1", "1");
long now = new Date().getTime();
task.setScheduledForDate(new Date(now - 1000));
assertTrue(task.isPastReminder());
@@ -92,7 +92,7 @@ public class TaskListStandaloneTest extends TestCase {
public void testDates() {
Date start = Calendar.getInstance().getTime();
Date creation = new Date();
- Task task = new Task("1", "task 1", true);
+ Task task = new Task("1", "task 1");
manager.getTaskList().moveToRoot(task);
assertDatesCloseEnough(task.getCreationDate(), start);
@@ -131,7 +131,7 @@ public class TaskListStandaloneTest extends TestCase {
externalizers.add(new BugzillaTaskExternalizer());
// make some tasks
// save them
- BugzillaTask task = new BugzillaTask("http://bugs", "1", "1", true);
+ BugzillaTask task = new BugzillaTask("http://bugs", "1", "1");
manager.getTaskList().addTask(task);
manager.saveTaskList();
diff --git a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/TaskReportGeneratorTest.java b/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/TaskReportGeneratorTest.java
index fc4668494..48f67387c 100644
--- a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/TaskReportGeneratorTest.java
+++ b/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/TaskReportGeneratorTest.java
@@ -55,7 +55,7 @@ public class TaskReportGeneratorTest extends TestCase {
}
public void testCompletedTasksRetrieved() throws InvocationTargetException, InterruptedException {
- Task task1 = new Task(TasksUiPlugin.getTaskListManager().genUniqueTaskHandle(), "task 1", true);
+ Task task1 = new Task(TasksUiPlugin.getTaskListManager().genUniqueTaskHandle(), "task 1");
manager.getTaskList().moveToRoot(task1);
CompletedTaskCollector collector = new CompletedTaskCollector(new Date(0));
@@ -71,7 +71,7 @@ public class TaskReportGeneratorTest extends TestCase {
}
public void testCompletedTasksDateBoundsRetrieved() throws InvocationTargetException, InterruptedException {
- Task task1 = new Task(TasksUiPlugin.getTaskListManager().genUniqueTaskHandle(), "task 1", true);
+ Task task1 = new Task(TasksUiPlugin.getTaskListManager().genUniqueTaskHandle(), "task 1");
manager.getTaskList().moveToRoot(task1);
task1.setCompleted(true);
Thread.sleep(1000);
@@ -93,7 +93,7 @@ public class TaskReportGeneratorTest extends TestCase {
public void testCompletedBugzillaTasksRetrieved() throws InvocationTargetException, InterruptedException {
BugzillaTask task1 = new BugzillaTask("repo", "1",
- "bugzillatask 1", true);
+ "bugzillatask 1");
manager.getTaskList().moveToRoot(task1);
CompletedTaskCollector collector = new CompletedTaskCollector(new Date(0));
@@ -109,7 +109,7 @@ public class TaskReportGeneratorTest extends TestCase {
}
public void testCompletedTasksInCategoryRetrieved() throws InvocationTargetException, InterruptedException {
- Task task1 = new Task(TasksUiPlugin.getTaskListManager().genUniqueTaskHandle(), "task 1", true);
+ Task task1 = new Task(TasksUiPlugin.getTaskListManager().genUniqueTaskHandle(), "task 1");
manager.getTaskList().moveToRoot(task1);
task1.setCompleted(true);
TaskCategory cat1 = new TaskCategory("TaskReportGeneratorTest Category", manager.getTaskList());
@@ -132,8 +132,7 @@ public class TaskReportGeneratorTest extends TestCase {
}
public void testCompletedBugzillaTasksInCategoryRetrieved() throws InvocationTargetException, InterruptedException {
- BugzillaTask task1 = new BugzillaTask("repo", "1", "task 1",
- true);
+ BugzillaTask task1 = new BugzillaTask("repo", "1", "task 1");
manager.getTaskList().moveToRoot(task1);
task1.setCompleted(true);
TaskCategory cat1 = new TaskCategory("TaskReportGeneratorTest Category", manager.getTaskList());
@@ -156,8 +155,7 @@ public class TaskReportGeneratorTest extends TestCase {
}
public void testCompletedBugzillaTasksInQueryRetrieved() throws InvocationTargetException, InterruptedException {
- BugzillaTask task1 = new BugzillaTask("repo", "1", "task 1",
- true);
+ BugzillaTask task1 = new BugzillaTask("repo", "1", "task 1");
manager.getTaskList().moveToRoot(task1);
task1.setCompleted(false);

Back to the top