/// <summary> /// Initialize a TestCase object using a Gregorian year/month/day and the /// corresponding fields for the calendar being tested. /// </summary> /// /// <param name="gregYear">The Gregorian year of the date to be tested</param> /// <param name="gregMonth">The Gregorian month of the date to be tested</param> /// <param name="gregDay">The Gregorian day of the month of the date to be tested</param> /// <param name="era">The ERA field of tested calendar on the given gregorian date</param> /// <param name="year">The YEAR field of tested calendar on the given gregorian date</param> /// <param name="month">The MONTH (0-based) field of tested calendar on the givengregorian date</param> /// <param name="day">The DAY_OF_MONTH field of tested calendar on the givengregorian date</param> /// <param name="dayOfWeek">The DAY_OF_WEEK field of tested calendar on the givengregorian date</param> /// <param name="hour">The HOUR field of tested calendar on the given gregorian date</param> /// <param name="min">The MINUTE field of tested calendar on the given gregoriandate</param> /// <param name="sec">The SECOND field of tested calendar on the given gregoriandate</param> public TestCase(int gregYear, int gregMonth, int gregDay, int era, int year, int month, int day, int dayOfWeek, int hour, int min, int sec) { this.fields = new int[32]; this.isSet = new bool[32]; GregorianCalendar greg = new GregorianCalendar(UTC, ILOG.J2CsMapping.Util.Locale.GetDefault()); greg.Clear(); greg.Set(gregYear, gregMonth - 1, gregDay); SetTime(greg.GetTime()); Set(IBM.ICU.Util.Calendar.ERA, era); Set(IBM.ICU.Util.Calendar.YEAR, year); Set(IBM.ICU.Util.Calendar.MONTH, month - 1); Set(IBM.ICU.Util.Calendar.DATE, day); Set(IBM.ICU.Util.Calendar.DAY_OF_WEEK, dayOfWeek); Set(IBM.ICU.Util.Calendar.HOUR, hour); Set(IBM.ICU.Util.Calendar.MINUTE, min); Set(IBM.ICU.Util.Calendar.SECOND, sec); }