public void AcceptFriendRequestTest()
        {
            var request = new FriendRequestDummyCreator().Create();

            friendService.AcceptRequest(request);

            friendRepository.Verify(m => m.Add(It.IsAny <Friend>()), Times.Once);
            friendRepository.Verify(m => m.RemoveFriendshipRequest(It.Is <FriendRequest>(r => r == request)), Times.Once);
            warningService.Verify(m => m.AddWarning(It.IsAny <int>(), It.IsAny <string>()), Times.Once);
        }
Exemple #2
0
 public void AcceptRequest(int id)
 {
     friendService.AcceptRequest(id, currentUser.Id);
 }