public void Should_return_email_recepients_based_on_email_type(Type type, string[] expectedRecepients) { var broker = new MailingListBroker(new[] { new MailingRule("System", MailingList.Create("*****@*****.**", "*****@*****.**")), new MailingRule("System.String", MailingList.Create("*****@*****.**", "*****@*****.**")), new MailingRule("System.Int32", MailingList.Create("*****@*****.**", "*****@*****.**")) }); var recepients = broker.GetRecepients(type); Assert.That(recepients, Is.EquivalentTo(new MailingList(expectedRecepients))); }
public void Setup() { _sender = new TestEmailSender(); var outgouingQueue = new PersistentQueue(Guid.NewGuid().ToString("n")); var mailingListBroker = new MailingListBroker(new[] { new MailingRule("*", new MailingList("alice@localhost")) }); var templateEngine = new RazorMailTemplateEngine(new RazorTemplatesFactory("Resources"), true); _notifier = new MailNotifier( "me@localhost", outgouingQueue, mailingListBroker, templateEngine, _sender); }