GetMonthsInYear() public method

public GetMonthsInYear ( int year, int era ) : int
year int
era int
return int
 public void NegTest1()
 {
     System.Globalization.Calendar tbc = new ThaiBuddhistCalendar();
     Random rand = new Random(-55);
     int year = rand.Next(tbc.MinSupportedDateTime.Year + 543, tbc.MaxSupportedDateTime.Year + 544);
     int era = 2;
     Assert.Throws<ArgumentOutOfRangeException>(() =>
     {
         tbc.GetMonthsInYear(year, era);
     });
 }
 public void PosTest3()
 {
     System.Globalization.Calendar tbc = new ThaiBuddhistCalendar();
     DateTime dt = tbc.MaxSupportedDateTime;
     int year = dt.Year + 543;
     int era;
     for (int i = 0; i < tbc.Eras.Length; i++)
     {
         era = tbc.Eras[i];
         Assert.Equal(_months_IN_YEAR, tbc.GetMonthsInYear(year, era));
     }
 }
 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 era;
     for (int i = 0; i < tbc.Eras.Length; i++)
     {
         era = tbc.Eras[i];
         Assert.Equal(_months_IN_YEAR, tbc.GetMonthsInYear(year, era));
     }
 }