public ProgramControllerTest(String testName) {
super(testName);
}
protected void setUp() throws Exception {
Program test = new Program();
test.setIdProgram(TEST_ID);
test.setProgramAcronym("TEST");
test.setProgram(getName());
test.setStartDate(new Date());
test.setEndDate(new Date());
ctrl.create(test);
Calendar cal = Calendar.getInstance();
cal.clear();
test.setIdProgram(TEST_ID+1);
test.setProgramAcronym("TEST");
test.setProgram(getName());
cal.set(2007, 1, 1); //1st of Feb 2007
test.setStartDate(cal.getTime());
cal.set(2007, 11, 31); //31st of Dec 2007
test.setEndDate(cal.getTime());
ctrl.create(test);
cal = Calendar.getInstance();
test.setIdProgram(TEST_ID+2);
test.setProgramAcronym("TEST");
test.setProgram(getName());
cal.set(2006, 1, 1); //1st of Feb 2006
test.setStartDate(cal.getTime());
cal.set(2006, 11, 31); //31st of Dec 2006
test.setEndDate(cal.getTime());
ctrl.create(test);
test.setIdProgram(TEST_ID+3);
test.setProgramAcronym("TEST");
test.setProgram(getName());
cal.set(2008, 0, 1); //1st of Jan 2008
test.setStartDate(cal.getTime());
cal.set(2008, 11, 31); //31st of Dec 2008
test.setEndDate(cal.getTime());
ctrl.create(test);
}