Exemplo n.º 1
0
        public void MarkInvitationAsUsedTest()
        {
            const string invitationGuid = "FAFAF87C-5555-4446-BB86-DCA23BD5A43C";

            var returned = new List <Dictionary <string, object> >
            {
                new Dictionary <string, object>
                {
                    { "dp_RecordID", 178 },
                    { "Source_ID", 123123 },
                    { "Email_address", "*****@*****.**" },
                    { "Group_Role_ID", "66" },
                    { "Invitation_Type_ID", 1 },
                    { "Recipient_Name", "Test User" },
                    { "Invitation_Date", "1/13/2004" },
                }
            };

            _ministryPlatformService.Setup(mocked => mocked.GetRecordsDict(InvitationPageId, It.IsAny <string>(), It.IsAny <string>(), string.Empty)).Returns(returned);
            _ministryPlatformService.Setup(mocked => mocked.UpdateRecord(InvitationPageId, It.IsAny <Dictionary <string, object> >(), It.IsAny <string>())).Verifiable();

            _fixture.MarkInvitationAsUsed(invitationGuid);
            _ministryPlatformService.VerifyAll();
        }