Пример #1
0
 public void testBadDate() throws ParseException {
   DatePicker p = makePicker(Locale.ENGLISH);
   Date d = parseDate("1996-08-03T15:33");
   p.setDate(d);
   p.setMonth(new Integer(13));
   assertNull(p.getDate());
 }
Пример #2
0
  public void testReadWriteFromMap() throws ParseException {
    HashMap form = new HashMap();
    DatePicker p = makePicker(Locale.ENGLISH);
    Date d = parseDate("1996-08-03T15:33");
    p.setDate(d);
    p.writeToMap(form);

    p = makePicker(Locale.ENGLISH);
    p.readMap(form);
    assertEquals(d, p.getDate());
  }