public void Setup() { var xmlStudentDao = new XmlStudentDao(); xmlStudentDao.Create(new Student { Id = 1, Name = "ParaTestear", LastName = "safsdf", Age = 6 }); xmlStudentDao.Create(new Student { Id = 2, Name = "ParaTestear", LastName = "safsdf", Age = 6 }); xmlStudentDao.Create(new Student { Id = 3, Name = "ParaTestear", LastName = "safsdf", Age = 6 }); xmlStudentDao.Create(new Student { Id = 4, Name = "ParaTestear", LastName = "safsdf", Age = 6 }); }
public void Create_GivenAFourStudentsInFile_ShouldReturnAListWithFiveElement() { var student = new Student { Id = 5, Name = "Pepe", LastName = "Perez", Age = 21 }; var xmlStudentDao = new XmlStudentDao(); xmlStudentDao.Create(student); var list = xmlStudentDao.GetAll(); Assert.AreEqual(5, list.Count); }