public void TestMemberMonashGsbCommunity() { // Create a member. var community = TestCommunity.MonashGsb.CreateTestCommunity(_communitiesCommand, _verticalsCommand, _contentEngine); var member = CreateMember(community); _isMonashCommunity = true; // Create an email verification. var emailVerification = new EmailVerification { UserId = member.Id, EmailAddress = member.GetBestEmailAddress().Address }; _emailVerificationsCommand.CreateEmailVerification(emailVerification); // Send the email. var templateEmail = new ReactivationEmail(member, emailVerification); _emailsCommand.TrySend(templateEmail); // Check. var email = _emailServer.AssertEmailSent(); email.AssertAddresses(Return, Return, member); email.AssertSubject(Subject); email.AssertViewChecks(MediaTypeNames.Text.Html); email.AssertView(MediaTypeNames.Text.Html, GetBody(templateEmail, member, GetContent(templateEmail, member, emailVerification))); email.AssertNoAttachments(); AssertCompatibleAddresses(email); }
void IAccountVerificationsCommand.SendReactivation(IRegisteredUser user) { // Only supported for members at the moment. var member = user as IMember; if (member == null) { return; } // Find an existing activation or create a new one. var emailVerification = GetEmailVerification(member); // Send the email. var email = new ReactivationEmail(member, emailVerification); _emailsCommand.TrySend(email); }