public void CannotUpdateAnAccountNameToTheSameNameAsAnExistingAccount() { DataHelper.NewDb(); var service = new RentalsService(); var account = service.FindAccount(1); account.Name = "BankAccount3"; service.SaveUpdatedAccount(account); Assert.Fail("Added an account with same name as an exiting account"); }
public void CanUpdateAccount() { DataHelper.NewDb(); var service = new RentalsService(); var account = service.FindAccount(1); string expected = "ChangedBankName"; account.Name = expected; service.SaveUpdatedAccount(account); Assert.AreEqual(expected, service.FindAccount(1).Name); }