Ejemplo n.º 1
0
        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();
            }
        }
Ejemplo n.º 2
0
        public void BenchMarkSaveTaskDetils()
        {
            TaskViewModel Input = new TaskViewModel();

            Input.ProjectId      = 0;
            Input.ProjectName    = "TestProject";
            Input.StartDate      = DateTime.Now;
            Input.EndDate        = DateTime.Now.AddDays(1);
            Input.ParentTaskId   = 0;
            Input.ParentTaskName = "Test Parent Task";
            Input.Priority       = 1;
            Input.Status         = "No";
            Input.IsParentTask   = true;
            Input.ManagerId      = 1;
            Input.ManagerName    = "Saui";
            Input.TaskId         = fetchUserId + 1;
            Input.TaskName       = "Child of parent task unit testing";

            if (Input != null)
            {
                taskDetailsBL.SaveTaskDetils(Input);
            }
        }