/** * We are dealing with a sequence for the startDate and endDate, hence both are required to be * valid. */ public void testInvalidEmployee() throws Exception { period = new Period(); period.setStartDate(start); info = new EmploymentInfo(); info.setId(ID); info.setG1(period); employee = new Employee(); employee.setIdAndStartDateAndEndDate(info); assertFalse("Invalid employee found to be valid", xmlValidator.validateRoot(employee)); }
public void testValidEmployee() throws Exception { period = new Period(); period.setStartDate(start); period.setEndDate(end); info = new EmploymentInfo(); info.setId(ID); info.setG1(period); employee = new Employee(); employee.setIdAndStartDateAndEndDate(info); assertTrue("Valid employee reported invalid", xmlValidator.validateRoot(employee)); }