Ejemplo n.º 1
0
        //Test to GetAllProjects to return all the projects
        public void ShouldReturnAllProjects()
        {
            List <ProjectEntity> allProjects = _mockRepository.GetAllProjects();

            Assert.IsTrue(allProjects.Count() == 5);
            Assert.IsTrue(allProjects.ElementAt(0).ProjectId == 1);
            Assert.IsTrue(allProjects.ElementAt(1).ProjectName == "Creating Prototype");
            Assert.IsTrue(allProjects.ElementAt(2).ProjectPriority == 4);
            Assert.IsTrue(allProjects.ElementAt(2).DateReqd == "Y");
            Assert.IsTrue(allProjects.ElementAt(2).StartDate == new DateTime(2018, 9, 10));
        }
 public List <ProjectEntity> GetAllProjects()
 {
     return(_projDL.GetAllProjects());
 }