Testing a method that sends e-mail without sending the mail
- by SnOrfus
I have a method like
public abstract class Base
{
public void MethodUnderTest();
}
public class ClassUnderTest : Base
{
public override MethodUnderTest()
{
if(condition)
{
IMail mail = new Mail() { /* ... */ };
IMailer mailer = new Mailer() { /* ... */ }
mailer.Send(mail);
}…