public MailServiceTests() { templateLocator = new ResourceLocator(GetType().Assembly); configuration = new Mock<IConfiguration>(); configuration.SetupGet(m => m.Sender).Returns("*****@*****.**"); configuration.SetupGet(m => m.SmtpHost).Returns("127.0.0.1"); }
public IMailSender GetMailSender(IMailTemplateLocator templateLocator, IConfiguration configuration, string templatePath, IDictionary<string, object> data) { var sender = new MailSender { TemplateLocator = templateLocator, Configuration = configuration }; sender.Initialize(templatePath, data); return sender; }
// ReSharper disable ParameterHidesMember public MailService RegisterTemplateLocator(IMailTemplateLocator templateLocator) { this.templateLocator = templateLocator; return this; }