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)); } }
public List <string> FindListOfFriend(string user) { return(crudOnFriends.GetFriendsOfUser(user).Result); }