コード例 #1
0
 @Theory
 public void badlyFormattedWithoutRef() {
   try {
     GitDateParser.parse(dateStr, null);
     fail("The expected ParseException while parsing '" + dateStr + "' did not occur.");
   } catch (ParseException e) {
     // expected
   }
 }
コード例 #2
0
 @Theory
 public void badlyFormattedWithExplicitRef() {
   Calendar ref =
       new GregorianCalendar(
           SystemReader.getInstance().getTimeZone(), SystemReader.getInstance().getLocale());
   try {
     GitDateParser.parse(dateStr, ref);
     fail("The expected ParseException while parsing '" + dateStr + "' did not occur.");
   } catch (ParseException e) {
     // expected
   }
 }