diff options
author | Steffen Pingel | 2013-04-26 18:51:15 +0000 |
---|---|---|
committer | Steffen Pingel | 2013-04-27 13:29:53 +0000 |
commit | 6b7bd3f4d476cd8c613c3c04d2637b43483b20a7 (patch) | |
tree | eada4bdfc33edde477fbf06399e525daa1d0e0b7 /org.eclipse.mylyn.bugzilla.tests | |
parent | 3f06de687d2aa99e29671cb119821c336d734fcf (diff) | |
download | org.eclipse.mylyn.tasks-6b7bd3f4d476cd8c613c3c04d2637b43483b20a7.tar.gz org.eclipse.mylyn.tasks-6b7bd3f4d476cd8c613c3c04d2637b43483b20a7.tar.xz org.eclipse.mylyn.tasks-6b7bd3f4d476cd8c613c3c04d2637b43483b20a7.zip |
399803: avoid error in editor test
Change-Id: I5fbec52991446de900bfa0f975890b9860b95096
Task-Url: https://bugs.eclipse.org/bugs/show_bug.cgi?id=399803
Diffstat (limited to 'org.eclipse.mylyn.bugzilla.tests')
-rw-r--r-- | org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/ui/BugzillaTaskEditorTest.java | 10 |
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 050edf540..ed9dff35d 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()); |