Esempio n. 1
0
        public void GetProjectbyIDTest_WhenValuesLessOrEqualtoZero_ShouldBeNull()
        {
            ProjectRepository target = new ProjectRepository(); // TODO: Initialize to an appropriate value
            int ID = 0; // TODO: Initialize to an appropriate value
            IProject expected = null; // TODO: Initialize to an appropriate value

            IProject actual= target.GetProjectbyID(ID);

            Assert.AreEqual(expected, actual);
        }
Esempio n. 2
0
 public void GetAllProjectsbyOwner_NotValidOwner_ShouldBeNull()
 {
     ProjectRepository projectrepository = new ProjectRepository(projectlist);
     Owner owner = new Owner
     {
         ID = 77,
         Name = "Fernando Arean"
     };
     IList<IProject> result =projectrepository.GetProjectsbyAdministrator(owner);
     Assert.AreEqual(0, result.Count);
 }
Esempio n. 3
0
        public void GetProjectbyIDTest_WhenValuesGreaterThanZero_ShouldBeNotNullandFindit()
        {
            ProjectRepository projectrepository = new ProjectRepository(projectlist);
            int ID = 2; // TODO: Initialize to an appropriate value

            IProject actual= _projectsrepository.GetProjectbyID(ID);
            Assert.IsNotNull(actual);
            Assert.AreEqual(ID,actual.ID);
        }
Esempio n. 4
0
        public void GetAllProjectsbyOwner_NotValidOwner_ShouldBeFindit()
        {
            Owner owner = new Owner
            {
                ID = 3,
                Name = "Omar Guntaue"
            };
            ProjectRepository projectrepository = new ProjectRepository(projectlist);
            var result = projectrepository.GetProjectsbyAdministrator(owner);

            Assert.AreEqual(2,result.Count);
        }