Example #1
0
        public void ConverterCreatesWorkingCalendar()
        {
            var converter = new CalendarConverter();

            var output = converter.Convert(TestSchedules.CreateScheduleDetails(), null);

            Assert.True(output.IsActiveOn(new DateTime(2019, 8, 1)));
            Assert.False(output.IsActiveOn(new DateTime(2019, 8, 3)));
        }
Example #2
0
        public void ConverterReusesExistingCalendar()
        {
            var converter = new CalendarConverter();

            var output1 = converter.Convert(TestSchedules.CreateScheduleDetails(), null);
            var output2 = converter.Convert(TestSchedules.CreateScheduleDetails(), null);

            Assert.Same(output1, output2);
        }