GetDayOfYear() public method

public GetDayOfYear ( System.DateTime time ) : int
time System.DateTime
return int
        public void PosTest3()
        {
            System.Globalization.Calendar tbc = new ThaiBuddhistCalendar();
            DateTime dt = tbc.MaxSupportedDateTime;

            Assert.Equal(365, tbc.GetDayOfYear(dt));
        }
        public void PosTest1()
        {
            System.Globalization.Calendar tbc = new ThaiBuddhistCalendar();
            Random rand = new Random(-55);
            int year = rand.Next(tbc.MinSupportedDateTime.Year + 543, tbc.MaxSupportedDateTime.Year + 544);
            int month = rand.Next(1, 12);
            int day;
            if (IsLeapYear(year))
            {
                day = rand.Next(1, _DAYS_PER_MONTHS_IN_LEAP_YEAR[month] + 1);
            }
            else
            {
                day = rand.Next(1, _DAYS_PER_MONTHS_IN_NO_LEAP_YEAR[month] + 1);
            }

            DateTime dt = tbc.ToDateTime(year, month, day, 0, 0, 0, 0);
            int actualDay = getDayOfYear(dt);
            Assert.Equal(actualDay, tbc.GetDayOfYear(dt));
        }
 public void PosTest4()
 {
     System.Globalization.Calendar tbc = new ThaiBuddhistCalendar();
     DateTime dt = new DateTime(2000, 12, 31);
     Assert.Equal(366, tbc.GetDayOfYear(dt));
 }