public void SendNoMailOnEmptyTo()
        {
            var logger = new LogWrapper(new ConsoleLogger(true));
            var mailer = CreateMailer(logger);

            mailer.Send("".Split(','), "irrevant", "", null);

            Assert.AreEqual(1, logger.Infos.Count);
            Assert.AreEqual("Er zal geen mail verstuurd worden: email adres van de ontvanger(s) is leeg", logger.Infos.First());
        }
 private static ProgramWrapper CreateProgram(IResourceReader resources, DateTime? lastId = null)
 {
     var logger = new LogWrapper(new ConsoleLogger(true));
     var config = FileConfig.Load(@"..\..\config-test.xml");
     var mailer = new SmtpMailer(logger, config.SmtpMailConfig);
     var r = new WrappedResources(resources);
     return new ProgramWrapper(logger,
         r,
         new ArticleReader(),
         new PdfArticleRenderer(logger, config, config.EvoPdfLicenseKey),
         new DeCorrespondentResources(r, logger),
         new KindleEmailSender(logger, config.KindleEmailSenderConfig, mailer),
         new EmailNotificationSender(logger, mailer, config.EmailNotificationSenderConfig),
         lastId );
 }
 public ProgramWrapper(LogWrapper logger, WrappedResources resources, IArticleReader articleReader, IArticleRenderer articleRenderer, IDeCorrespondentResources reader, IEReaderSender sender, INotificationSender summarySender, DateTime? last)
 {
     this.logger = logger;
     wrappedResources = resources;
     LastDs = new MemoryLastDatasource(last);
     Program = new DeCorrespondent.Program(new DeCorrespondent.Program.ProgramArguments(true), logger, articleReader, articleRenderer, reader, LastDs, sender, summarySender, 20);
 }