private void ReassignSubtasks(Guid fromUserId, Guid toUserId)
        {
            var tasks = SubtaskEngine.GetByResponsible(fromUserId, TaskStatus.Open);

            foreach (var task in tasks)
            {
                AddToTeam(task.Project, toUserId);
                foreach (var subtask in task.SubTasks)
                {
                    subtask.Responsible = toUserId;
                    SubtaskEngine.SaveOrUpdate(subtask, task);
                }
            }
        }
        public void ReassignSubtasks()
        {
            var task = DataGenerator.GenerateTask(Project);

            task.Responsibles = new List <Guid> {
                Admin
            };
            task = TaskEngine.SaveOrUpdate(task, new List <int>(), false);

            var subtask1 = DataGenerator.GenerateSubtask(task);

            subtask1.Responsible = From;
            subtask1             = SubtaskEngine.SaveOrUpdate(subtask1, task);

            var subtask2 = DataGenerator.GenerateSubtask(task);

            subtask2.Responsible = From;
            subtask2             = SubtaskEngine.SaveOrUpdate(subtask2, task);

            var subtask3 = DataGenerator.GenerateSubtask(task);

            subtask3.Responsible = From;
            subtask3             = SubtaskEngine.SaveOrUpdate(subtask3, task);
            SubtaskEngine.ChangeStatus(task, subtask3, TaskStatus.Closed);

            ProjectsReassign.Reassign(From, To);

            subtask1 = SubtaskEngine.GetById(subtask1.ID);
            Assert.That(subtask1.Responsible, Is.EqualTo(To));

            subtask2 = SubtaskEngine.GetById(subtask2.ID);
            Assert.That(subtask2.Responsible, Is.EqualTo(To));

            subtask3 = SubtaskEngine.GetById(subtask3.ID);
            Assert.That(subtask3.Responsible, Is.EqualTo(From));
        }