public void AddParentTaskTest_Success()
        {
            // Arrange
            ProjectMangerModel.ParentTasks model = new ProjectMangerModel.ParentTasks
            {
                ParentTaskID   = 3,
                ParentTaskName = "Parent Task 3"
            };

            // Act
            var response = taskController.AddParentTask(model);

            // Assert
            Assert.IsTrue(response is OkResult);
        }
        public IHttpActionResult AddParentTask([FromBody] ProjectMangerModel.ParentTasks task)
        {
            try
            {
                CommonEntities.ParentTasks tk = new CommonEntities.ParentTasks
                {
                    ParentTask = task.ParentTask
                };

                _taskBL.AddParentTask(tk);
                return(Ok());
            }
            catch (Exception)
            {
                return(InternalServerError());
            }
        }
        public void AddParentTaskTest_Error()
        {
            // Arrange
            var taskController = new TasksController(null);

            ProjectMangerModel.ParentTasks model = new ProjectMangerModel.ParentTasks
            {
                ParentTaskID   = 3,
                ParentTaskName = "Parent Task 3"
            };

            // Act
            var response = taskController.AddParentTask(model);

            // Assert
            Assert.IsTrue(response is InternalServerErrorResult);
        }