예제 #1
0
        public void CreateAndGetGroupMemberRequest()
        {
            var groupMemberName = "CreateGroupMemberRequest";

            var requestor = CreateUser(groupMemberName + " Requestor");
            var acceptor  = CreateGroup(groupMemberName + " Acceptor");

            var newMember = CreateRelationshipRequest(requestor.Id, acceptor.Id);

            var groupRequests = _relationshipController.GetRelationRequestorActors(newMember.AcceptorId, ActorType.User);

            var matches = groupRequests.Count(g => g.Name == groupMemberName + " Requestor");

            Assert.Equal(matches, 1);
        }
예제 #2
0
        public void CreateAndGetUserFriendRequest()
        {
            var userFriendName = " CreateRelationshipRequest";

            var requestor = Helpers.CreateUser(userFriendName + " Requestor");
            var acceptor  = Helpers.CreateUser(userFriendName + " Acceptor");

            var newFriend = CreateRelationshipRequest(requestor.Id, acceptor.Id);

            var userRequests = _relationshipController.GetRelationRequestorActors(newFriend.AcceptorId, ActorType.User);

            var matches = userRequests.Count(g => g.Name == userFriendName + " Requestor");

            Assert.Equal(matches, 1);
        }