Example #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();
        }
Example #2
0
        public async Task <IHttpActionResult> GetFriends(string username)
        {
            try
            {
                var friends = await crudOnFriends.GetFriendsOfUser(username);

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