public void ItShouldSave() { //arrange var expectedCount = 1; //act context.Clients.Add(new Client { Name = "Pop", Surname = "Andrew", Phone = 0744441111, Email = "*****@*****.**" }); _sut.SaveChanges(); //assert Assert.AreEqual(expectedCount, context.Clients.Where(x => x.Name == "Pop").ToList().Count()); }
public void ItShouldSave() { //arrange var expectedCount = 1; //act context.Authors.Add(new Author { Name = "Pop" }); _sut.SaveChanges(); //assert Assert.AreEqual(expectedCount, context.Authors.Where(x => x.Name == "Pop").ToList().Count()); }
public void ItShouldSave() { //arrange var expectedCount = 1; //act context.Reviews.Add(new Review { Rating = 500, Comment = "good" }); _sut.SaveChanges(); //assert Assert.AreEqual(expectedCount, context.Reviews.Where(x => x.Rating == 500).ToList().Count()); }
public void ItShouldSave() { //arrange var expectedCount = 1; //act context.Books.Add(new Book { Title = "1984" }); _sut.SaveChanges(); //assert Assert.AreEqual(expectedCount, context.Books.Where(x => x.Title == "1984").ToList().Count()); }
public void ItShouldSave() { //arrange var expectedCount = 1; //act context.Addresses.Add(new Address { City = "Iasi", Street = "Strada porumbeilor", PostalCode = "720214" }); _sut.SaveChanges(); //assert Assert.AreEqual(expectedCount, context.Addresses.Where(x => x.City == "Iasi").ToList().Count()); }
public void ItShouldSave() { //arrange var expectedCount = 1; //act context.Loans.Add(new Loan { LoanDate = DateTime.Now, Tax = 100, DelayPenalty = 500 }); _sut.SaveChanges(); //assert Assert.AreEqual(expectedCount, context.Loans.Where(x => x.Tax == 100).ToList().Count()); }
public void Remove(string EIN) { _repository.Remove(EIN); _repository.SaveChanges(); }
public void Remove(string applicationId) { _repository.Remove(applicationId); _repository.SaveChanges(); }