public BatterReport Choose(DateTime gameDate, int numberRequired) { var report = new BatterReport(gameDate) { Selections = SelectBatters(gameDate, numberRequired) }; return(report); }
public void MailReport(BatterReport report) { var message = report.AsString(); _logger.Info(message); _mailMan.SendMail( message, subject: $"BTS {Utility.UniversalDate(report.GameDate)}"); _logger.Info($"mail sent to {_mailMan.RecipientCsv()}"); }
public void TestSendBatterReportMail() { var batterReport = new BatterReport( new System.DateTime(2018, 06, 23)) { Selections = new List <Selection> { new Selection { Batter = new Batter { Name = "Jacob Stallings" }, Pitcher = new Pitcher { Name = "Carlos Santana" } } } }; sut.MailReport(batterReport); }