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

            var existingFriend = GetFriendsList()[0];

            var foundFriend = _repositoryStub.Find(existingFriend.Id).Result;

            Assert.AreEqual(_friend.Name, foundFriend.Name);
            Assert.AreEqual(_friend.Phone, foundFriend.Phone);
        }
示例#2
0
        // GET: Friends/Details/5
        public async Task <IActionResult> Details(long id)
        {
            var friend = await _repository.Find(id);

            if (friend == null)
            {
                return(NotFound());
            }

            return(View(friend));
        }