//Test to add the project public void ShouldAddProject() { var projectId = _projectList.Count() + 1; var projectDetail = new ProjectEntity { ProjectId = projectId, ProjectName = "New Project for Testing", ProjectPriority = 6, ProjectStatus = "Y", DateReqd = "Y", StartDate = new DateTime(2018, 10, 5), EndDate = new DateTime(2018, 12, 7), ManagerId = 3, AddDate = DateTime.Now }; _mockRepository.AddProject(projectDetail); ProjectEntity addedProject = _mockRepository.GetProject(projectId); Assert.IsTrue(_projectList.Count() == 6); Assert.IsNotNull(addedProject); Assert.AreSame(addedProject.GetType(), typeof(ProjectEntity)); Assert.AreEqual(addedProject.ProjectId, projectId); Assert.IsTrue(projectDetail.ProjectName == addedProject.ProjectName); Assert.IsTrue(projectDetail.ManagerId == addedProject.ManagerId); }
public void AddProject(ProjectEntity project) { _projDL.AddProject(project); }