protected void assertStringEquals(String expected, Object testThis) {
assertEquals(expected, String.valueOf(testThis));
}
public @Test void testDateTool() { /* TODO still incomplete */
DateTool dateTool = (DateTool)toolbox.get("date");
assertNotNull(dateTool);
Date date = new GregorianCalendar(2007,0,2).getTime();
String disp = "2007-01-02";
String disp2 = "2007/01/02";
/* check configured format */
assertEquals("yyyy-MM-dd",dateTool.getFormat());
/* test formatting */
assertEquals(disp,dateTool.format(date));
assertEquals(disp2,dateTool.format("yyyy/MM/dd",date));
/* test parsing */
assertEquals(2007,dateTool.getYear(disp));
assertEquals(0,dateTool.getMonth(disp));
assertEquals(2,dateTool.getDay(disp));
}