public void BLL_GetAccountByIdExecute_Test(string lastName, string firstName, string accountID, decimal invoiceAmount, double bonusScores) { var mock = new Mock <IRepository>(); IAccountService service = new BankAccountService(mock.Object); service.GetAccountByID(accountID); mock.Verify(a => a.FindAccountByID(accountID)); }
public void BLL_FindAccounByID_Test(string lastName, string firstName, string accountID, decimal invoiceAmount, double bonusScores) { BankAccount account = new BaseAccount(new AccountOwner(firstName, lastName), accountID, invoiceAmount, bonusScores); var mock = new Mock <IRepository>(); mock.Setup(a => a.FindAccountByID(It.IsAny <string>())).Returns(account); IAccountService service = new BankAccountService(mock.Object); var actualAccount = service.GetAccountByID(accountID); Assert.NotNull(account); }