public void DeleteCollegeTest() { CollegeRepository collegeRepository = new CollegeRepository(new Data.Entities.VitalityDatabase()); var collegeList = collegeRepository.GetAll(); College college = collegeList.First(); Assert.IsTrue(collegeRepository.Delete(college)); }
public void UpdateCollegeTest() { CollegeRepository collegeRepository = new CollegeRepository(new Data.Entities.VitalityDatabase()); var collegeList = collegeRepository.GetAll(); if (collegeList.Count > 0) { College college = collegeList.First(); college.Name = "DokuzEylül"; Assert.IsTrue(collegeRepository.Update(college)); } }
public void DeleteListCollegeTest() { CollegeRepository collegeRepository = new CollegeRepository(new VitalityDatabase()); /*College college = new College(); * College college2 = new College(); * colleges.Add(college); * colleges.Add(college2);*/ List <College> colleges = new List <College>(); colleges = collegeRepository.GetAll(); if (colleges.Count > 0) { Assert.IsTrue(collegeRepository.Delete(colleges)); } }