summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteffen Pingel2013-04-26 14:51:15 (EDT)
committerSteffen Pingel2013-04-27 09:29:53 (EDT)
commit6b7bd3f4d476cd8c613c3c04d2637b43483b20a7 (patch)
treeeada4bdfc33edde477fbf06399e525daa1d0e0b7
parent3f06de687d2aa99e29671cb119821c336d734fcf (diff)
downloadorg.eclipse.mylyn.tasks-6b7bd3f4d476cd8c613c3c04d2637b43483b20a7.zip
org.eclipse.mylyn.tasks-6b7bd3f4d476cd8c613c3c04d2637b43483b20a7.tar.gz
org.eclipse.mylyn.tasks-6b7bd3f4d476cd8c613c3c04d2637b43483b20a7.tar.bz2
399803: avoid error in editor testrefs/changes/48/12248/4
Change-Id: I5fbec52991446de900bfa0f975890b9860b95096 Task-Url: https://bugs.eclipse.org/bugs/show_bug.cgi?id=399803
-rw-r--r--org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/ui/BugzillaTaskEditorTest.java10
1 files changed, 6 insertions, 4 deletions
diff --git a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/ui/BugzillaTaskEditorTest.java b/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/ui/BugzillaTaskEditorTest.java
index 050edf5..ed9dff3 100644
--- a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/ui/BugzillaTaskEditorTest.java
+++ b/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/ui/BugzillaTaskEditorTest.java
@@ -20,6 +20,7 @@ import org.eclipse.mylyn.internal.tasks.ui.util.TasksUiInternal;
import org.eclipse.mylyn.tasks.core.TaskMapping;
import org.eclipse.mylyn.tasks.core.TaskRepository;
import org.eclipse.mylyn.tasks.core.data.TaskData;
+import org.eclipse.mylyn.tasks.ui.TasksUi;
import org.eclipse.mylyn.tasks.ui.editors.TaskEditor;
import org.eclipse.mylyn.tests.util.TestFixture;
import org.eclipse.ui.IWorkbenchPage;
@@ -35,13 +36,16 @@ public class BugzillaTaskEditorTest extends TestCase {
@Override
protected void setUp() throws Exception {
+ // ensure that the local repository is present
TestFixture.resetTaskListAndRepositories();
repository = BugzillaFixture.current().repository();
+ TasksUi.getRepositoryManager().addRepository(repository);
}
@Override
protected void tearDown() throws Exception {
UiTestUtil.closeAllEditors();
+ TestFixture.resetTaskListAndRepositories();
}
/**
@@ -66,10 +70,8 @@ public class BugzillaTaskEditorTest extends TestCase {
}
};
- final TaskData[] taskData = new TaskData[1];
-
- taskData[0] = TasksUiInternal.createTaskData(repository, taskMappingInit, taskMappingSelect, null);
- TasksUiInternal.createAndOpenNewTask(taskData[0]);
+ TaskData taskData = TasksUiInternal.createTaskData(repository, taskMappingInit, taskMappingSelect, null);
+ TasksUiInternal.createAndOpenNewTask(taskData);
IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
TaskEditor taskEditor = (TaskEditor) page.getActiveEditor();
assertEquals("New Task", taskEditor.getTitle());