Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrelves2007-05-24 20:31:51 +0000
committerrelves2007-05-24 20:31:51 +0000
commit27ab93c545a8c034f533ca4174f64e6e04983d09 (patch)
tree5574d6451760d626c8d1d738c26b222915e9fb0f /org.eclipse.mylyn.bugzilla.tests
parentd2062f2503a946862624bf191e2ad1a03a13fc03 (diff)
downloadorg.eclipse.mylyn.tasks-27ab93c545a8c034f533ca4174f64e6e04983d09.tar.gz
org.eclipse.mylyn.tasks-27ab93c545a8c034f533ca4174f64e6e04983d09.tar.xz
org.eclipse.mylyn.tasks-27ab93c545a8c034f533ca4174f64e6e04983d09.zip
ASSIGNED - bug 187246: Make synchronize action on query do full synch of all contained tasks (and hits)
https://bugs.eclipse.org/bugs/show_bug.cgi?id=187246
Diffstat (limited to 'org.eclipse.mylyn.bugzilla.tests')
-rw-r--r--org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaRepositoryConnectorTest.java29
1 files changed, 29 insertions, 0 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 8790e367e..2b3c159cc 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
@@ -50,6 +50,35 @@ import org.eclipse.mylar.tasks.ui.search.SearchHitCollector;
*/
public class BugzillaRepositoryConnectorTest extends AbstractBugzillaTest {
+
+
+
+ public void testFocedQuerySynchronization() throws CoreException {
+ init222();
+ TasksUiPlugin.getSynchronizationManager().setForceSyncExec(true);
+ TasksUiPlugin.getDefault().getTaskDataManager().clear();
+ assertEquals(0, taskList.getAllTasks().size());
+ BugzillaRepositoryQuery bugQuery = new BugzillaRepositoryQuery(IBugzillaConstants.TEST_BUGZILLA_222_URL, "http://mylar.eclipse.org/bugs222/buglist.cgi?short_desc_type=allwordssubstr&short_desc=&product=Read+Only+Test+Cases&long_desc_type=allwordssubstr&long_desc=&bug_status=NEW&order=Importance",
+ "testFocedQuerySynchronization", taskList);
+
+ taskList.addQuery(bugQuery);
+
+ TasksUiPlugin.getSynchronizationManager().synchronize(connector, bugQuery, null, false);
+
+ assertEquals(1, bugQuery.getHits().size());
+ AbstractQueryHit hit = (AbstractQueryHit) bugQuery.getHits().toArray()[0];
+ assertTrue(TasksUiPlugin.getDefault().getTaskDataManager().getNewTaskData(hit.getHandleIdentifier()) != null);
+ TasksUiPlugin.getDefault().getTaskDataManager().remove(hit.getHandleIdentifier());
+ assertTrue(hit.getCorrespondingTask() == null);
+
+ TasksUiPlugin.getSynchronizationManager().synchronize(connector, bugQuery, null, true);
+ assertEquals(1, bugQuery.getHits().size());
+ hit = (AbstractQueryHit) bugQuery.getHits().toArray()[0];
+ assertTrue(TasksUiPlugin.getDefault().getTaskDataManager().getNewTaskData(hit.getHandleIdentifier()) != null);
+
+ }
+
+
public void testCreateTaskFromExistingId() throws Exception {
init222();
try {

Back to the top