public async Task IsAbleToListFriendsAsync()
        {
            await InsertFriend();

            var newFriend = new Friend
            {
                Name  = "My New Friend's Name Test",
                Phone = "(99) 99999-9997"
            };
            var insertResult = _sut.Create(newFriend);

            var foundFriends = _repositoryStub.FindAll().Result;

            Assert.AreEqual(2, foundFriends.Count());
        }
示例#2
0
 // GET: Friends
 public async Task <IActionResult> Index()
 {
     return(View(await _repository.FindAll()));
 }