public void CreateParentTask() { int intParenTaskId = 5; IRepository <ParentTask> ParenttaskRepository = new Repository <ParentTask>(); IRepository <ProjectDetails> projectRepository = new Repository <ProjectDetails>(); IRepository <UserDetails> userRepository = new Repository <UserDetails>(); IRepository <ProjectTaskDetails> taskRepository = new Repository <ProjectTaskDetails>(); IParentTaskDetailsBL parentTaskBusiness = new ParentTaskDetailsBL(ParenttaskRepository); IProjectDetailsBL projectBusiness = new ProjectDetailsBL(projectRepository, userRepository, taskRepository); TaskDetailsBL PDBL = new TaskDetailsBL(taskRepository, parentTaskBusiness, projectBusiness, userRepository); var Input = GetTaskInPut(); Input.TaskName = "Parent Task Unit Testing"; if (Input != null) { PDBL.SaveTaskDetils(Input); } var ParentTaskDetail = PDBL.GetAllParentTaskDetails(); var qq = ParentTaskDetail.Where(tt => tt.ParentTaskId == intParenTaskId); if (qq != null) { Assert.Pass(); } else { Assert.Fail(); } }
public void GetAllParentTask() { IRepository <ParentTask> ParenttaskRepository = new Repository <ParentTask>(); IRepository <ProjectDetails> projectRepository = new Repository <ProjectDetails>(); IRepository <UserDetails> userRepository = new Repository <UserDetails>(); IRepository <ProjectTaskDetails> taskRepository = new Repository <ProjectTaskDetails>(); IParentTaskDetailsBL parentTaskBusiness = new ParentTaskDetailsBL(ParenttaskRepository); IProjectDetailsBL projectBusiness = new ProjectDetailsBL(projectRepository, userRepository, taskRepository); TaskDetailsBL TDBL = new TaskDetailsBL(taskRepository, parentTaskBusiness, projectBusiness, userRepository); var TaskDetailList = TDBL.GetAllParentTaskDetails(); var TaskDetailListExpected = TDBL.GetAllParentTaskDetails(); if (TaskDetailList != null) { if (TaskDetailList.Count() == TaskDetailListExpected.Count()) { Assert.Pass(); } else { Assert.Fail(); } } else if (TaskDetailList == null && TaskDetailListExpected == null) { Assert.Pass(); } else { Assert.Fail(); } }
public void BenchMarkGetAllParentTaskDetails() { taskDetailsBL.GetAllParentTaskDetails(); }