예제 #1
0
        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);
        }
예제 #2
0
        public IHttpActionResult GetParentTasks()
        {
            Collection <string> tasks = new Collection <string>();

            var blTasks = taskManagerBL.GetParentTasks();

            blTasks.ToList().ForEach(x => tasks.Add(x));

            return(Ok(tasks));
        }
예제 #3
0
        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);
            }
        }