Ejemplo n.º 1
0
        public void TaskConstructorTest()
        {
            // Arrange
            var project = new ProjectMother().Build();
            var taskType = new TaskTypeMother().Build();
            var expectedTaskName = "Task Test";

            // Act
            var task = new Task(expectedTaskName, taskType, project);
            var actual = task.TaskName;
            var actualProject = task.AssignedProject;
            var actualTaskType = task.TaskType;

            // Assert
            Assert.AreEqual(expectedTaskName, actual);
            Assert.AreEqual(project, actualProject);
            Assert.AreEqual(taskType, actualTaskType);
            Assert.IsNotNull(task.GetAssignedMembers());
            Assert.IsNotNull(task.GetSubtasks());
        }