Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  * OfficeFloor -
  * Copyright (C) 2005-2011 Daniel Sagenschneider
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation, either version 3 of the License, or
  * (at your option) any later version.
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * GNU General Public License for more details.
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <>.
package net.officefloor.model.impl.desk;
Tests renaming the net.officefloor.model.desk.TaskModel.

Daniel Sagenschneider
public class RenameTaskTest extends AbstractDeskChangesTestCase {

	public void testRenameTaskNotOnDesk() {
		TaskModel task = new TaskModel("NOT_ON_DESK"false"WORK",
		Change<TaskModelchange = this..renameTask(task"NEW_NAME");
		this.assertChange(changetask"Rename task NOT_ON_DESK to NEW_NAME",
				false"Task NOT_ON_DESK not on desk");

Ensure can rename the net.officefloor.model.desk.TaskModel.
	public void testRenameTask() {
		TaskModel task = this..getTasks().get(0);
		Change<TaskModelchange = this..renameTask(task"NEW_NAME");
		this.assertChange(changetask"Rename task OLD_NAME to NEW_NAME",

Ensures on renaming the net.officefloor.model.desk.TaskModel that order is maintained.
		TaskModel task = this..getTasks().get(0);
		Change<TaskModelchange = this..renameTask(task"TASK_C");
		this.assertChange(changetask"Rename task TASK_A to TASK_C"true);
New to GrepCode? Check out our FAQ X