public void testUpdate() { // Arrange int count = repo.All().Count(); repo.Add(entity); this.repo.SaveChanges(); Assert.Null(repo.GetByDetails(99, "ס")); Assert.AreEqual(count + 1, repo.All().Count()); entity.ClassNumber = 99; // Act repo.Update(entity); repo.SaveChanges(); // Assert Assert.NotNull(repo.GetByDetails(99, "ס")); this.repo.HardDelete(entity); this.repo.SaveChanges(); }