private CandidateLookingNotificationEmail CreateCandidateLookingNotificationEmail(string emailAddress) { var email = new CandidateLookingNotificationEmail(_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 CandidateLookingNotificationEmail(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); }