public void Accept_With_Parent() { #region preparation Task task = new Task { Project = get_project() }; Task brother = new Task { Project = get_project() }; Task parent = new Task { IsVirtual = true, Project = get_project() }; parent.AddChild(task); parent.AddChild(brother); TaskQuality Quality = TaskQuality.Good; #endregion #region only the brother is accept, not affect parent brother.Accept(Quality); brother.has_accept(Quality); Assert.That(parent.CurrentStatus, Is.Not.EqualTo(Status.Accept)); #endregion #region both the brother and task are accepted, affect their parent now task.Accept(Quality); task.AutoAcceptAncestors(); task.has_accept(Quality); parent.has_accept(Constants.CommentAutoAcceptForChildren); Assert.That(parent.Quality, Is.Null); #endregion }