public void UpdateListCollegeTest() { List <College> colleges = new List <College>(); College college = new College(); College college2 = new College(); college.Name = "İstanbul Üniversitesi"; college.City = "İstanbul"; college2.Name = "Ege Üniversitesi"; college2.City = "İstanbul"; colleges.Add(college); colleges.Add(college2); CollegeRepository collegeRepository = new CollegeRepository(new VitalityDatabase()); collegeRepository.Insert(colleges); foreach (var item in colleges) { item.City = "İzmir"; } Assert.IsTrue(collegeRepository.Update(colleges)); }
public void InsertCollegeTest() { CollegeRepository collegeRepository = new CollegeRepository(new Data.Entities.VitalityDatabase()); College college1 = new College(); college1.City = "İstanbul"; Assert.IsTrue(collegeRepository.Update(college1)); }
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)); } }