public void DeleteAccount_ToDeleteAccount_Success() { Account account = AccountMockData.GetAccountClass(); mockAccountRepository.Setup(cr => cr.FindBy(It.IsAny <int>())).Returns(account); DeleteAccountRequest req = new DeleteAccountRequest(10); DeleteAccountResponse response = accountService.DeleteAccount(req); mockRepository.VerifyAll(); Assert.AreEqual(null, response.Exception); }
public void GetAccount_ToGetAccountById_Success() { GetAccountRequest req = new GetAccountRequest(10) { RequestedBy = 1 }; Account account = AccountMockData.GetAccountClass(); mockAccountRepository.Setup(cr => cr.FindBy(It.IsAny <int>())).Returns(account); GetAccountResponse response = accountService.GetAccount(req); mockRepository.VerifyAll(); Assert.AreEqual(response.AccountViewModel.AccountID, account.Id); Assert.AreEqual(null, response.Exception); }