Exemple #1
0
        [Test, Timeout(180000)] // Can take a long time under NCrunch.
        public void BclThroughHistory()
        {
            var bcl  = new HijriCalendar();
            var noda = CalendarSystem.IslamicBcl;

            BclEquivalenceHelper.AssertEquivalent(bcl, noda, noda.MinYear, noda.MaxYear);
        }
Exemple #2
0
        public void BclThroughHistory()
        {
            var bcl  = BclCalendars.Hijri;
            var noda = CalendarSystem.IslamicBcl;

            BclEquivalenceHelper.AssertEquivalent(bcl, noda);
        }
Exemple #3
0
        public void BclThroughHistory()
        {
            Calendar       bcl  = BclCalendars.Persian;
            CalendarSystem noda = BclCalendars.CalendarSystemForCalendar(bcl);

            // Note: Noda Time stops in 9377, whereas the BCL goes into the start of 9378. This is because
            // Noda Time ensures that the whole year is valid.
            BclEquivalenceHelper.AssertEquivalent(bcl, noda);
        }
Exemple #4
0
        public void BclThroughHistory()
        {
            Calendar bcl = new PersianCalendar();
            // The "right" BCL equivalent to use depends on the version of .NET... pick it appropriately here.
            CalendarSystem noda = bcl.IsLeapYear(1) ? CalendarSystem.PersianSimple : CalendarSystem.PersianAstronomical;

            // Note: Noda Time stops in 9377, whereas the BCL goes into the start of 9378. This is because
            // Noda Time ensures that the whole year is valid.
            BclEquivalenceHelper.AssertEquivalent(bcl, noda, noda.MinYear, noda.MaxYear);
        }
Exemple #5
0
        [Test, Timeout(300000)] // Can take a long time under NCrunch.
        public void BclThroughHistory_Civil()
        {
            Calendar bcl  = new HebrewCalendar();
            var      noda = CalendarSystem.HebrewCivil;

            // The min supported date/time starts part way through the year
            var minYear = bcl.GetYear(bcl.MinSupportedDateTime) + 1;
            // The max supported date/time ends part way through the year
            var maxYear = bcl.GetYear(bcl.MaxSupportedDateTime) - 1;

            BclEquivalenceHelper.AssertEquivalent(bcl, noda, minYear, maxYear);
        }
 public void BclEquivalence()
 {
     BclEquivalenceHelper.AssertEquivalent(BclCalendars.UmAlQura, CalendarSystem.UmAlQura);
 }