Пример #1
0
 public static void GetWeeksInYear()
 {
     for (int year = 0; year <= 400; year++)
     {
         int expected = s_yearsWith53Weeks.Contains(year) ? 53 : 52;
         Assert.Equal(expected, ISOWeek.GetWeeksInYear(2000 + year));
     }
 }
Пример #2
0
 public static void GetWeeksInYear_WithInvalidYear_Throws(int year)
 {
     AssertExtensions.Throws <ArgumentOutOfRangeException>(nameof(year), () => ISOWeek.GetWeeksInYear(year));
 }