public void testYearPeriod() {
System.out.println("yearPeriod");
AbstractDatePickerTableCellEditor date_picker = getDatePickerTableCellEditor();
YearPeriod yp = new YearPeriod(2004, 2009);
try {
date_picker.setYearPeriod(yp);
} catch (PropertyVetoException ex) {
LOGGER.error("yearPeriod", ex);
fail(ex.getLocalizedMessage());
}
assertEquals("Wrong year period:", yp, date_picker.getYearPeriod());
java.util.Calendar cal = java.util.Calendar.getInstance();
cal.set(java.util.Calendar.YEAR, 2005);
try {
date_picker.setDate(cal);
} catch (PropertyVetoException ex) {
LOGGER.error("yearPeriod", ex);
fail(ex.getLocalizedMessage());
}
yp = new YearPeriod(2007, 2009);
try {
date_picker.setYearPeriod(yp);
} catch (PropertyVetoException ex) {
LOGGER.error("yearPeriod", ex);
fail(ex.getLocalizedMessage());