public void HandlesNonAmbiguousAndValidTimeWhenSchedulingJobs()
        {
            DateTime ambiguousDateTime = DateTime.Parse("11/01/2020 12:30:00");

            Assert.That(
                ScheduledBackgroundJobBootstrapper.MakeUtcCronTime(ambiguousDateTime.Year, ambiguousDateTime.Month,
                                                                   ambiguousDateTime.Day, ambiguousDateTime.Hour, ambiguousDateTime.Minute),
                Is.EqualTo(DateTime.Parse("11/01/2020 20:30:00")),
                "Given an non-ambiguous and valid time, time remains the same local time before converting to UTC");
        }
        public void HandlesinvalidDaylightSavingsTimeWhenSchedulingJobs()
        {
            DateTime invalidDateTime = DateTime.Parse("03/08/2020 02:15:00");

            Assert.That(TimeZoneInfo.Local.IsInvalidTime(invalidDateTime), "This test requires an invalid time.");
            Assert.That(
                ScheduledBackgroundJobBootstrapper.MakeUtcCronTime(invalidDateTime.Year, invalidDateTime.Month,
                                                                   invalidDateTime.Day, invalidDateTime.Hour, invalidDateTime.Minute),
                Is.EqualTo(DateTime.Parse("03/08/2020 10:16:00")),
                "Given an invalid time, move the local time ahead 1 hour and 1 minute before converting to UTC");
        }
        public void HandlesAmbiguousDaylightSavingsTimeWhenSchedulingJobs()
        {
            DateTime ambiguousDateTime = DateTime.Parse("11/01/2020 01:15:00");

            Assert.That(TimeZoneInfo.Local.IsAmbiguousTime(ambiguousDateTime), "This test requires an ambiguous time.");
            Assert.That(
                ScheduledBackgroundJobBootstrapper.MakeUtcCronTime(ambiguousDateTime.Year, ambiguousDateTime.Month,
                                                                   ambiguousDateTime.Day, ambiguousDateTime.Hour, ambiguousDateTime.Minute),
                Is.EqualTo(DateTime.Parse("11/01/2020 10:16:00")),
                "Given an ambiguous time, move the local time ahead 1 hour and 1 minute before converting to UTC");
        }