Ejemplo n.º 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());
 }
Ejemplo n.º 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());
  }