示例#1
0
        private MeetingTimes StoreMidweekData(
            int week,
            int weekCount,
            DateTime dateOfMidweekMtg,
            DateTimeServiceForTests dateTimeService)
        {
            var startOfMtg = dateOfMidweekMtg + TimeSpan.FromHours(19);
            var plannedEnd = startOfMtg.AddMinutes(TotalMtgLengthMins);

            var service = new LocalTimingDataStoreService(null, dateTimeService);

            dateTimeService.Set(startOfMtg);

            service.InsertMeetingStart(startOfMtg);
            service.InsertPlannedMeetingEnd(plannedEnd);

            InsertTimer(service, dateTimeService, "Introductory Segment", true, false, 5, false);

            InsertTimer(service, dateTimeService, "Opening Comments", false, false, 3);

            InsertTimer(service, dateTimeService, "Treasures", false, false, 10);

            InsertTimer(service, dateTimeService, "Digging for Spiritual Gems", false, false, 8);

            InsertTimer(service, dateTimeService, "Bible Reading", false, true, 4);
            dateTimeService.Add(GetCounselDuration());

            InsertTimer(service, dateTimeService, "Ministry Talk 1", false, true, 2);
            dateTimeService.Add(GetCounselDuration());

            InsertTimer(service, dateTimeService, "Ministry Talk 2", false, true, 4);
            dateTimeService.Add(GetCounselDuration());

            InsertTimer(service, dateTimeService, "Ministry Talk 3", false, true, 6);
            dateTimeService.Add(GetCounselDuration());

            InsertTimer(service, dateTimeService, "Interim Segment", true, false, _interimDuration, false);

            InsertTimer(service, dateTimeService, "Living Item 1", false, false, 15);

            InsertTimer(service, dateTimeService, "Congregation Bible Study", false, false, 30);

            InsertTimer(service, dateTimeService, "Review", false, false, 3);

            InsertTimer(service, dateTimeService, "Concluding Segment", true, false, 5, false);

            service.InsertActualMeetingEnd(dateTimeService.Now());

            service.Save();

            if (week == weekCount - 1)
            {
                var file = TimingReportGeneration.ExecuteAsync(service, null).Result;
                Assert.IsNotNull(file);
            }

            return(service.MeetingTimes);
        }
示例#2
0
        private void StoreWeekendData(
            int week,
            DateTime dateOfWeekendMtg,
            DateTimeServiceForTests dateTimeService)
        {
            var startOfMtg = dateOfWeekendMtg + TimeSpan.FromHours(10);
            var plannedEnd = startOfMtg.AddMinutes(TotalMtgLengthMins);

            var service = new LocalTimingDataStoreService(null, dateTimeService);

            if (week == 0)
            {
                service.DeleteAllData();
            }

            dateTimeService.Set(startOfMtg);

            service.InsertMeetingStart(startOfMtg);
            service.InsertPlannedMeetingEnd(plannedEnd);

            dateTimeService.Add(TimeSpan.FromSeconds(1));

            // song and prayer
            InsertTimer(service, dateTimeService, "Introductory Segment", true, false, 5, false);

            // public talk...
            InsertTimer(service, dateTimeService, "Public Talk", false, false, 30);

            // song
            InsertTimer(service, dateTimeService, "Interim Segment", true, false, _interimDuration, false);

            // WT...
            InsertTimer(service, dateTimeService, "Watchtower Study", false, false, 60);

            InsertTimer(service, dateTimeService, "Concluding Segment", true, false, 5, false);

            service.InsertActualMeetingEnd(dateTimeService.Now());

            service.Save();
        }