public void MyTestInitialize() { target = new Mailer() { SmtpServer = "Invalid", SmtpUser = string.Empty, SmtpPassword = "******", From = "*****@*****.**", To = "*****@*****.**", }; SmtpClientContext = new Mock<IEmailClientProxy>(); SmtpClientContext.SetupAllProperties(); SmtpClientContext.Setup(x => x.Send(It.IsAny<MailMessage>())).Verifiable("called send"); target.MailClient = SmtpClientContext.Object; }
public void Setup() { target = new Mailer(); //target.SmtpServer = "smtp.server.com"; }