Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormkersten2005-07-12 23:41:41 +0000
committermkersten2005-07-12 23:41:41 +0000
commit23c8cbf0c6d069ce144d0844eb6071420662b796 (patch)
tree5767983ebefbf27e4b6e6fe04cb55f5118c191cf /org.eclipse.mylyn.tasks.tests
parentbe3f7f6ab9e002af2321a0c1858251ba98df0441 (diff)
downloadorg.eclipse.mylyn.tasks-23c8cbf0c6d069ce144d0844eb6071420662b796.tar.gz
org.eclipse.mylyn.tasks-23c8cbf0c6d069ce144d0844eb6071420662b796.tar.xz
org.eclipse.mylyn.tasks-23c8cbf0c6d069ce144d0844eb6071420662b796.zip
Progress on Bugzilla Bug 103099
decouple tasks from mylar.ui
Diffstat (limited to 'org.eclipse.mylyn.tasks.tests')
-rw-r--r--org.eclipse.mylyn.tasks.tests/META-INF/MANIFEST.MF4
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/bugzilla/tests/BugzillaSearchPluginTest.java23
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/bugzilla/tests/BugzillaStackTraceTest.java6
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskListManagerTest.java4
4 files changed, 20 insertions, 17 deletions
diff --git a/org.eclipse.mylyn.tasks.tests/META-INF/MANIFEST.MF b/org.eclipse.mylyn.tasks.tests/META-INF/MANIFEST.MF
index 6bf658d25..b71f68108 100644
--- a/org.eclipse.mylyn.tasks.tests/META-INF/MANIFEST.MF
+++ b/org.eclipse.mylyn.tasks.tests/META-INF/MANIFEST.MF
@@ -14,7 +14,9 @@ Require-Bundle: org.eclipse.core.runtime,
org.eclipse.jdt.core,
org.eclipse.core.resources,
org.eclipse.ui,
- org.eclipse.mylar.bugzilla.core
+ org.eclipse.mylar.bugzilla.core,
+ org.eclipse.mylar.bugzilla.ui,
+ org.eclipse.mylar.bugzilla
Eclipse-AutoStart: true
Bundle-ClassPath: mylar-tasklist-tests.jar
Export-Package: org.eclipse.mylar.tasks.bugzilla.tests,
diff --git a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/bugzilla/tests/BugzillaSearchPluginTest.java b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/bugzilla/tests/BugzillaSearchPluginTest.java
index 566486648..9eec2c3a6 100644
--- a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/bugzilla/tests/BugzillaSearchPluginTest.java
+++ b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/bugzilla/tests/BugzillaSearchPluginTest.java
@@ -20,16 +20,17 @@ import junit.framework.TestCase;
import org.eclipse.jdt.core.IJavaProject;
import org.eclipse.jdt.core.IType;
+import org.eclipse.mylar.bugzilla.MylarBugzillaPlugin;
+import org.eclipse.mylar.bugzilla.ui.tasks.BugzillaReportNode;
+import org.eclipse.mylar.bugzilla.ui.tasks.BugzillaTask;
+import org.eclipse.mylar.bugzilla.ui.tasks.BugzillaTask.BugTaskState;
import org.eclipse.mylar.core.search.IActiveSearchListener;
import org.eclipse.mylar.core.tests.support.WorkspaceSetupHelper;
import org.eclipse.mylar.core.tests.support.search.SearchPluginTestHelper;
-import org.eclipse.mylar.tasks.BugzillaTask;
-import org.eclipse.mylar.tasks.TaskCategory;
import org.eclipse.mylar.tasks.MylarTasksPlugin;
+import org.eclipse.mylar.tasks.TaskCategory;
import org.eclipse.mylar.tasks.TaskList;
-import org.eclipse.mylar.tasks.BugzillaTask.BugTaskState;
-import org.eclipse.mylar.tasks.bugzilla.BugzillaReportNode;
-import org.eclipse.mylar.tasks.bugzilla.search.BugzillaMylarSearch;
+import org.eclipse.mylar.tasks.search.BugzillaMylarSearch;
/*TEST CASES TO HANDLE
* 1. what is here
@@ -126,7 +127,7 @@ public class BugzillaSearchPluginTest extends TestCase{
// display the time it took for the search
// System.err.println("Search Took About " + time + " seconds");
- MylarTasksPlugin.getBridge().removeFromLandmarksHash(astNodeType);
+ MylarBugzillaPlugin.getBridge().removeFromLandmarksHash(astNodeType);
}
/**
@@ -162,7 +163,7 @@ public class BugzillaSearchPluginTest extends TestCase{
// display the time it took for the search and the results returned
// System.err.println("Search Took About " + time + " seconds");
// System.err.println(c);
- MylarTasksPlugin.getBridge().removeFromLandmarksHash(astNodeType);
+ MylarBugzillaPlugin.getBridge().removeFromLandmarksHash(astNodeType);
}
@@ -199,12 +200,12 @@ public class BugzillaSearchPluginTest extends TestCase{
assertTrue("Results not the right size", c.size() > 0); // TODO should be assertEquals on expected size
// check that the search has been saved
- List<BugzillaReportNode> saved = MylarTasksPlugin.getBridge().getFromLandmarksHash(astNodeType, BugzillaMylarSearch.UNQUAL);
+ List<BugzillaReportNode> saved = MylarBugzillaPlugin.getBridge().getFromLandmarksHash(astNodeType, BugzillaMylarSearch.UNQUAL);
assertTrue("Results not cached", saved != null);
assertTrue("Results not the right size", saved.size() > 0); // TODO should be assertEquals on expected size
assertTrue(c.containsAll(saved) && saved.containsAll(c));
- MylarTasksPlugin.getBridge().removeFromLandmarksHash(astNodeType);
+ MylarBugzillaPlugin.getBridge().removeFromLandmarksHash(astNodeType);
}
public void testLocalBugUnqual() throws InterruptedException {
@@ -263,7 +264,7 @@ public class BugzillaSearchPluginTest extends TestCase{
List<?> c = lists.get(0);
assertEquals("Results not the right size", 3, c.size());
- MylarTasksPlugin.getBridge().removeFromLandmarksHash(astNodeType);
+ MylarBugzillaPlugin.getBridge().removeFromLandmarksHash(astNodeType);
MylarTasksPlugin.getTaskListManager().getTaskList().deleteCategory(cat);
}
@@ -321,7 +322,7 @@ public class BugzillaSearchPluginTest extends TestCase{
List<?> c = lists.get(0);
assertEquals("Results not the right size", 1, c.size());
- MylarTasksPlugin.getBridge().removeFromLandmarksHash(astNodeType);
+ MylarBugzillaPlugin.getBridge().removeFromLandmarksHash(astNodeType);
MylarTasksPlugin.getTaskListManager().getTaskList().deleteCategory(cat);
}
diff --git a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/bugzilla/tests/BugzillaStackTraceTest.java b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/bugzilla/tests/BugzillaStackTraceTest.java
index 9c029cc7e..d8d5f1f81 100644
--- a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/bugzilla/tests/BugzillaStackTraceTest.java
+++ b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/bugzilla/tests/BugzillaStackTraceTest.java
@@ -22,11 +22,11 @@ import junit.framework.TestCase;
import org.eclipse.core.runtime.Path;
import org.eclipse.mylar.bugzilla.core.internal.BugParser;
import org.eclipse.mylar.bugzilla.core.search.BugzillaSearchHit;
+import org.eclipse.mylar.bugzilla.ui.tasks.BugzillaReportNode;
+import org.eclipse.mylar.bugzilla.ui.tasks.StackTrace;
import org.eclipse.mylar.core.tests.MylarCoreTestsPlugin;
import org.eclipse.mylar.core.tests.support.FileTool;
-import org.eclipse.mylar.tasks.bugzilla.BugzillaReportNode;
-import org.eclipse.mylar.tasks.bugzilla.StackTrace;
-import org.eclipse.mylar.tasks.bugzilla.search.BugzillaMylarSearchOperation;
+import org.eclipse.mylar.tasks.search.BugzillaMylarSearchOperation;
/**
diff --git a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskListManagerTest.java b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskListManagerTest.java
index 7d5babeaa..5f866779a 100644
--- a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskListManagerTest.java
+++ b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskListManagerTest.java
@@ -69,8 +69,8 @@ public class TaskListManagerTest extends TestCase {
manager.setTaskList(list);
manager.readTaskList();
assertNotNull(manager.getTaskList());
- assertEquals(manager.getTaskList().getRootTasks().size(), 2);
- assertEquals(manager.getTaskList().getCategories().size(), 2);
+ assertEquals(2, manager.getTaskList().getRootTasks().size());
+ assertEquals(2, manager.getTaskList().getCategories().size());
check(manager);
}

Back to the top