public IHttpActionResult GetParentTask(int id) { ParentTask parentTask = parentTaskBusiness.GetParentTask(id); if (parentTask == null) { return(NotFound()); } return(Ok(parentTask)); }
public void GetParentTaskTest() { //Arrange ParentTaskBusiness parentTaskBusiness = new ParentTaskBusiness(); //Act ParentTask parentTask = parentTaskBusiness.GetParentTask(2); //Assert if (parentTask != null) { Assert.AreEqual(2, parentTask.ParentId); } else { Assert.IsNotNull(parentTask); } }