예제 #1
0
        public void TestSoonerFirstSentTime()
        {
            // As part of the migration for 3.0 it was possible for there to be multiple
            // invitations.  This test checks that the latest one is returned.

            var dt        = DateTime.Now;
            var inviterId = Guid.NewGuid();

            var invitation1 = new NetworkingInvitation
            {
                InviterId           = inviterId,
                InviteeEmailAddress = EmailAddress,
                FirstSentTime       = dt
            };

            _networkingInvitationsCommand.CreateInvitation(invitation1);

            var invitation2 = new NetworkingInvitation
            {
                InviterId           = inviterId,
                InviteeEmailAddress = EmailAddress,
                FirstSentTime       = dt.AddDays(-2)
            };

            _networkingInvitationsCommand.CreateInvitation(invitation2);

            var invitation = _networkingInvitationsQuery.GetInvitation <NetworkingInvitation>(inviterId, EmailAddress);

            Assert.AreEqual(invitation1.Id, invitation.Id);
        }
예제 #2
0
 FriendInvitation IMemberFriendsQuery.GetFriendInvitation(Guid id)
 {
     return(GetInvitation(_networkingInvitationsQuery.GetInvitation <FriendInvitation>(id)));
 }