| /******************************************************************************* |
| * Copyright (c) 2004 - 2006 University Of British Columbia and others. |
| * All rights reserved. This program and the accompanying materials |
| * are made available under the terms of the Eclipse Public License v1.0 |
| * which accompanies this distribution, and is available at |
| * http://www.eclipse.org/legal/epl-v10.html |
| * |
| * Contributors: |
| * University Of British Columbia - initial API and implementation |
| *******************************************************************************/ |
| |
| package org.eclipse.mylyn.bugzilla.tests; |
| |
| import org.eclipse.mylyn.internal.bugzilla.core.BugzillaTask; |
| import org.eclipse.mylyn.internal.bugzilla.ui.tasklist.BugzillaTaskEditorInput; |
| import org.eclipse.mylyn.tasks.core.RepositoryTaskAttribute; |
| |
| |
| /** |
| * @author Rob Elves |
| */ |
| public class BugzillaTaskDataMigrationTest extends AbstractBugzillaTest { |
| |
| public void testMigrateDescriptionToReadOnly() throws Exception { |
| init222(); |
| BugzillaTask task = generateLocalTaskAndDownload("1"); |
| assertNotNull(task); |
| assertNotNull(task.getTaskData()); |
| RepositoryTaskAttribute attrib = task.getTaskData().getDescriptionAttribute(); |
| assertNotNull(attrib); |
| attrib.setReadOnly(false); |
| BugzillaTaskEditorInput editorInput = new BugzillaTaskEditorInput(repository, task, false); |
| assertTrue(editorInput.getBugTask().getTaskData().getDescriptionAttribute().isReadOnly()); |
| } |
| } |