public void DeleteCardAccountSuccessfully() { var repo = new CardAccountRepository(); var userId = "ec9bf096-c505-4bef-87f6-18822b9dbf2c"; //some user created before var account = new CardAccount { UserId = userId, Active = true, Card = new Card { FullName = "Batman", ExpiryMonth = "11", ExpiryYear = "2020", Number = "4111111111111111", Type = "visa", CVV = "123" } }; var createdAccount = repo.CreateCardAccount(account); Assert.IsTrue(createdAccount.Active); var result = repo.DeleteCardAccount(createdAccount.Id); Assert.IsTrue(result); var gotAccount = repo.GetCardAccountById(createdAccount.Id); Assert.IsFalse(gotAccount.Active); }
public void DeleteCardAccountSuccessfully() { var content = File.ReadAllText("../../Fixtures/card_account_delete.json"); var client = GetMockClient(content); var repo = new CardAccountRepository(client.Object); const string id = "25d34744-8ef0-46a4-8b18-2a8322933cd1"; var result = repo.DeleteCardAccount(id); client.VerifyAll(); Assert.IsTrue(result); }