Exemple #1
0
        public static void Main()
        {
            var builder = new ReportBuilder();
            var sender = new SmsReportSender();
            var reporter = new Reporter(builder, sender);

            reporter.SendReports();
        }
        public void IfNotReportsThenThrowException()
        {
            var builder = new Mock<IReportBuilder>();
            builder.Setup(m => m.CreateReports()).Returns(new List<Report>());

            var sender = new Mock<IReportSender>();

            var reporter = new Reporter(builder.Object, sender.Object);

            Assert.Throws<NoReportsException>(() => reporter.SendReports());
        }
Exemple #3
0
 public static void Main()
 {
     var reporter = new Reporter();
     reporter.SendReports();
 }
        public void IfNotReportsThenThrowException()
        {
            var reporter = new Reporter();

            reporter.SendReports();
        }