public void CreateTask() { int intParenTaskId = 3; 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.IsParentTask = false; if (Input != null) { PDBL.SaveTaskDetils(Input); } var TaskDetailList = PDBL.GetAllTaskDetails(); var qq = TaskDetailList.Where(tt => tt.TaskId == intParenTaskId); if (qq != null) { Assert.Pass(); } else { Assert.Fail(); } }
public void GetAllTask() { 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.GetAllTaskDetails(); var TaskDetailListExpected = TDBL.GetAllTaskDetails(); if (TaskDetailList != null && TaskDetailListExpected != null) { if (TaskDetailList.Count() == TaskDetailListExpected.Count()) { Assert.Pass(); } else { Assert.Fail(); } } else if (TaskDetailList == null && TaskDetailListExpected == null) { Assert.Pass(); } else { Assert.Fail(); } }
public void BenchMarkGetAllTaskDetails() { taskDetailsBL.GetAllTaskDetails(); }