// Test Add Task public void ShouldAddTask() { var taskId = _taskList.Count() + 1; var taskDetail = new TaskEntity { TaskId = taskId, Task = "testing the Test case", ParentId = 3, TaskPriority = 5, TaskStatus = "Y", StartDate = new DateTime(2018, 9, 10), EndDate = new DateTime(2018, 9, 11) }; _mockRepository.AddTask(taskDetail); TaskEntity addedTask = _mockRepository.GetTask(taskId); Assert.IsTrue(_taskList.Count() == 6); Assert.IsNotNull(addedTask); Assert.AreSame(addedTask.GetType(), typeof(TaskEntity)); Assert.AreEqual(taskId, addedTask.TaskId); Assert.IsTrue(taskDetail.Task == addedTask.Task); }
public void AddTask(TaskEntity task) { _projDL.AddTask(task); }