Created
February 5, 2016 20:25
-
-
Save blairconrad/676a70a980c6842b422f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Test] | |
public void GetAll_ReturnAccountsFromRepository() | |
{ | |
//Arrange | |
var mockAccountRepository = A.Fake<IAccountReposiory>(); | |
var accountManager = new AccountManager(mockAccountRepository); | |
//Build Expected | |
List<Account> expected = new List<Account>{}; | |
//Arrange Calls | |
A.CallTo(() => mockAccountRepository.GetAllAccounts()).Returns(expected); | |
//Act | |
var returned = accountManager.GetAll(); | |
//Assert | |
A.CallTo(() => mockAccountRepository.GetAllAccounts()).MustHaveHappened(); | |
Assert.AreEqual(expected, returned); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment