public EmailNotificatorTests(ITestOutputHelper output) { _output = output; var senderAddress = "*****@*****.**"; var senderName = "notif-test"; var mailhogSmtpServerConfig = new SmtpServerConfig() { Host = "localhost", Port = 25, SenderName = senderName, SenderAddress = senderAddress }; var mailSettingsConfig = new MailSettingsConfig() { Smtp = new MailSettingsConfig.SmtpConfig() { Servers = new List <SmtpServerConfig>() { mailhogSmtpServerConfig } } }; var toList = new List <string>(); var subject = "Test subject"; var body = "Test body"; _emailMessage = new EmailMessage(toList, subject, body); var smtpClientFactory = new SmtpClientWithoutSslFactory(); var mailMessageFactory = new MailMessageFactory(); _notificator = new EmailNotificator(smtpClientFactory, mailSettingsConfig, mailMessageFactory); }
public SmtpClientWithoutSslFactoryTests() { _factory = new SmtpClientWithoutSslFactory(); _smtpConfig = new SmtpServerConfig(); }