示例#1
0
        private CandidateLookingConfirmationEmail CreateCandidateLookingConfirmationEmail(string emailAddress)
        {
            var email = new CandidateLookingConfirmationEmail(_memberUser);

            _memberUser.EmailAddresses = new List <EmailAddress> {
                new EmailAddress {
                    Address = emailAddress
                }
            };
            email.To = _memberUser;
            return(email);
        }
        public void TestEmailContents()
        {
            // Create a member.

            var member = CreateMember();

            // Send the email.

            var templateEmail = new CandidateLookingConfirmationEmail(member);

            _emailsCommand.TrySend(templateEmail);

            // Check.

            var email = _emailServer.AssertEmailSent();

            email.AssertAddresses(Return, Return, member);
            email.AssertSubject(Subject);
            email.AssertHtmlViewChecks();
            email.AssertHtmlView(GetBody(templateEmail, member, GetContent(templateEmail, member)));
            AssertCompatibleAddresses(email);
        }