public void GetEmailPreviewUsageReport_FileTypeXml_RecurrenceWeekly_NoException()
        {
            // Arrange
            InitilizeGetEmailPreviewUsageReportTests(FileTypeXml, ValueRecurrenceTypeWeekly);
            var message         = new EmailDirect();
            var constructedBody = String.Empty;
            var report          = new TestEmailPreviewUsageReport(message, constructedBody, _reportSchedule, DateTime.Today);

            // Act
            var returnResult = report.Execute();

            // Assert
            returnResult.ShouldNotBeNull();
            returnResult.success.ShouldBeTrue();
            report.Body.ShouldContain(SuccessfulResultStringGetEmailPreviewUsageReport);
            _anyException.ShouldBeFalse();
        }
        public void GetEmailPreviewUsageReport_FileTypeDefault_RecurrenceTypeMonthly_NoData()
        {
            // Arrange
            InitilizeGetEmailPreviewUsageReportTests(String.Empty, ValueRecurrenceTypeMonthly);
            ShimEmailPreviewUsage.GetUsageDetailsAutomatedStringDateTimeDateTime =
                (x1, x2, x3) => new List <EmailPreviewUsage>();
            _testedClass.SetStaticFieldOrProperty(FieldMasterStartDate, new DateTime(2018, 2, 2));
            var message         = new EmailDirect();
            var constructedBody = String.Empty;
            var report          = new TestEmailPreviewUsageReport(message, constructedBody, _reportSchedule, DateTime.Today);

            // Act
            var returnResult = report.Execute();

            // Assert
            returnResult.ShouldNotBeNull();
            returnResult.success.ShouldBeFalse();
            report.Body.ShouldContain(NoRecordStringGetEmailPreviewUsageReport);
        }
        public void GetEmailPreviewUsageReport_FileTypeDefault_RecurrenceDefault_NoReportParameterException()
        {
            // Arrange
            InitilizeGetEmailPreviewUsageReportTests(String.Empty, String.Empty);
            _reportSchedule = new ECN_Framework_Entities.Communicator.Fakes.ShimReportSchedule
            {
                ReportParametersGet = () => throw new Exception(ExceptionNoReportScheduleParameters)
            };
            var message         = new EmailDirect();
            var constructedBody = String.Empty;
            var report          = new TestEmailPreviewUsageReport(message, constructedBody, _reportSchedule, DateTime.Today);

            // Act
            var returnResult = report.Execute();

            // Assert
            returnResult.ShouldNotBeNull();
            returnResult.success.ShouldBeFalse();
            report.Body.ShouldContain(FailureMessageForGetEmailPreviewUsageReport);
            _anyException.ShouldBeTrue();
            _exceptionMessage.ShouldBe(ExceptionNoReportScheduleParameters);
        }