public void GetParentTasksTest_WithoutID() { Mock <TaskManagerEntities> mockContext = MockDataSetList(); var taskManagerBL = new TaskManagerBL(mockContext.Object); Collection <string> tasks = taskManagerBL.GetParentTasks(); Assert.IsNotNull(tasks); Assert.IsTrue(tasks.Count > 0); }
public IHttpActionResult GetParentTasks() { Collection <string> tasks = new Collection <string>(); var blTasks = taskManagerBL.GetParentTasks(); blTasks.ToList().ForEach(x => tasks.Add(x)); return(Ok(tasks)); }
public void GetParentTasksTest_WIthID() { Mock <TaskManagerEntities> mockContext = MockDataSetList(); var taskManagerBL = new TaskManagerBL(mockContext.Object); Collection <string> tasks = taskManagerBL.GetParentTasks(1); Assert.IsNotNull(tasks); foreach (var task in tasks) { Assert.AreNotEqual("Task 1", task); } }