コード例 #1
0
        public void WhenAPlayerGetsAFriendRequestTheyCanSeeIt()
        {
            authHelper.loginToAccount("userOne");

            SendFriendRequestRequest request = new SendFriendRequestRequest()
            {
                FriendId = authHelper.getAccountId("userTwo")
            };

            SendFriendRequestResponse response = client.SendFriendRequest(request);

            Assert.AreEqual(response.Status.IsSuccess, true);

            authHelper.loginToAccount("userTwo");

            ViewFriendRequestsResponse friendRequestresponse = client.ViewFriendRequests(new ViewFriendRequestsRequest());

            Assert.AreEqual(friendRequestresponse.Status.IsSuccess, true);
            Assert.AreEqual(1, friendRequestresponse.IncomingFriends.Count);
            Assert.IsTrue(friendRequestresponse.IncomingFriends.Any((user) => user.Id == authHelper.getAccountId("userOne")));
        }