context = createDataContext();
}
public void testCalendar() throws Exception {
CalendarEntity test = context.newObject(CalendarEntity.class);
Calendar cal = Calendar.getInstance();
cal.clear();
cal.set(2002, 1, 1);
test.setCalendarField(cal);
context.commitChanges();
SelectQuery q = new SelectQuery(CalendarEntity.class);
CalendarEntity testRead = (CalendarEntity) context.performQuery(q).get(0);
assertNotNull(testRead.getCalendarField());
assertEquals(cal, testRead.getCalendarField());
test.setCalendarField(null);
context.commitChanges();
}