Exemple #1
0
        public void ShouldGetFriends()
        {
            crudOnFriends.AddUserFriend(firstUsername, secondUsername).Wait();
            var friends = crudOnFriends.GetFriendsOfUser(firstUsername).Result;

            Assert.AreEqual(friends[0], secondUsername);
            crudOnFriends.DeleteFriendFromUser(firstUsername, secondUsername).Wait();
        }
        public async Task <IHttpActionResult> GetFriends(string username)
        {
            try
            {
                var friends = await crudOnFriends.GetFriendsOfUser(username);

                return(Ok(friends));
            }
            catch (Exception ex)
            {
                return(throwExceptionToUser.Throw(ex));
            }
        }
Exemple #3
0
 public List <string> FindListOfFriend(string user)
 {
     return(crudOnFriends.GetFriendsOfUser(user).Result);
 }