public void UsingExtendedFilters() { var email = new Email { Sender = "*****@*****.**", Content = "I really like this campany !", Attachments = new[] { "apple.png" } }; var blocker = new SpamBlocker(); blocker.AddSpamHandler(new AttachmentHandler()); Assert.AreEqual(true, blocker.ShouldBlock(email)); }
public void UsingBaseFilters() { var email = new Email { Sender = "*****@*****.**", Content = "I really like this campany !", Attachments = new[] { "apple.png" } }; var blocker = new SpamBlocker(); Assert.AreEqual(false, blocker.ShouldBlock(email)); email.Sender = "*****@*****.**"; Assert.AreEqual(true, blocker.ShouldBlock(email)); }