示例#1
0
 private void runPassTest(String source) throws Exception {
   MonthDay oMonthDay = null;
   try {
     oMonthDay = new MonthDay(source);
   } catch (Exception e) { // catch the validation exception
     assertTrue("Validation exception thrown on valid input", false);
   }
   assertEquals("MonthDay.toString() not equal", source, oMonthDay.toString());
 }
示例#2
0
 /** Run a successful test. values should be valid. */
 private void runPassTest(int month, int day, String tz) throws Exception {
   MonthDay oMonthDay = null;
   try {
     oMonthDay = new MonthDay(month, day, tz);
   } catch (Exception e) { // catch the validation exception
     assertTrue("Validation exception thrown on valid input", false);
   }
   assertEquals("MonthDay month not equal", month, oMonthDay.getMonth());
   assertEquals("MonthDay day not equal", day, oMonthDay.getDay());
   assertEquals("MonthDay timezone not equal", tz, oMonthDay.getTimezone());
 }