public void DeleteUser_test() { ProjectManagmentController ic = new ProjectManagmentController(); IHttpActionResult actionResult = ic.DeleteUser(1); var contentResult = actionResult as OkResult; Assert.IsNotNull(contentResult); }
public void GetTasks_test() { ProjectManagmentController ic = new ProjectManagmentController(); IHttpActionResult actionResult = ic.GetTasks(); var contentResult = actionResult as OkNegotiatedContentResult <List <ProjectManagmenPortal.API.Task> >; Assert.IsTrue(contentResult.Content.Count >= 0); }
public void GetUserById_test() { ProjectManagmentController ic = new ProjectManagmentController(); IHttpActionResult actionResult = ic.GetUserById(1); var contentResult = actionResult as OkNegotiatedContentResult <List <ProjectManagmenPortal.API.Task> >; Assert.IsNull(contentResult); }
public void GetProjects_Test() { ProjectManagmentController ic = new ProjectManagmentController(); IHttpActionResult actionResult = ic.GetProjects(); var contentResult = actionResult as OkNegotiatedContentResult <List <Project> >; Assert.IsTrue(contentResult.Content.Count > 0); }
public void UpdateStatusOfTask_test() { ProjectManagmentController ic = new ProjectManagmentController(); IHttpActionResult actionResult = ic.UpdateStatusOfTask(1); var contentResult = actionResult as OkResult; Assert.IsNotNull(contentResult); }
public void AddProject_test() { ProjectManagmentController ic = new ProjectManagmentController(); IHttpActionResult actionResult = ic.AddProject(new Project { ProjectName = "TestProj", priority = 0, StartDate = DateTime.Now, EndDate = DateTime.Now.AddDays(1) }); var contentResult = actionResult as OkResult; Assert.IsNotNull(contentResult); }
public void AddParentTask_test() { ProjectManagmentController ic = new ProjectManagmentController(); IHttpActionResult actionResult = ic.AddParentTask(new ParentTask { parent_task = "ParentTest" }); var contentResult = actionResult as OkResult; Assert.IsNotNull(contentResult); }
public void AddTask_test() { ProjectManagmentController ic = new ProjectManagmentController(); IHttpActionResult actionResult = ic.AddTask(new ProjectManagmenPortal.API.Task { parent_id = "1", project_ID = "1", TaskName = "TestCase", Start_Date = DateTime.Now, End_Date = DateTime.Now.AddDays(1), priority = 15 }); var contentResult = actionResult as OkResult; Assert.IsNotNull(contentResult); }
public void AddUser_test() { ProjectManagmentController ic = new ProjectManagmentController(); IHttpActionResult actionResult = ic.AddUser(new User { Task_ID = "1", Employee_ID = "1", FirstName = "AB", Lastname = "CD", project_ID = "1" }); var contentResult = actionResult as OkResult; Assert.IsNotNull(contentResult); }
public void UpdateTask_test() { ProjectManagmentController ic = new ProjectManagmentController(); ProjectManagmenPortal.API.Task proj = new ProjectManagmenPortal.API.Task { Start_Date = DateTime.Now, End_Date = DateTime.Now.AddDays(2), priority = 13, Status = "Completed" }; IHttpActionResult actionResult = ic.UpdateTask(proj); var contentResult = actionResult as OkResult; Assert.IsNotNull(contentResult); }