@Test public void testGenerateTestEmploymentRecord() { EmploymentRecord employmentRecord = SifEntityGenerator.generateTestEmploymentRecord(); Assert.assertEquals(SifEntityGenerator.TEST_EMPLOYMENTRECORD_REFID, employmentRecord.getRefId()); Assert.assertEquals(SifEntityGenerator.TEST_STAFFPERSONAL_REFID, employmentRecord.getSIF_RefId()); Assert.assertEquals("StaffPersonal", employmentRecord.getSIF_RefObject()); Assert.assertEquals(SifEntityGenerator.TEST_LEAINFO_REFID, employmentRecord.getLEAInfoRefId()); Assert.assertTrue(employmentRecord.getActive()); Assert.assertEquals(FullTimeStatus.FULLTIME.getValue(), employmentRecord.getFullTimeStatus()); Calendar hireDate = employmentRecord.getHireDate(); Assert.assertEquals(2010, hireDate.get(Calendar.YEAR)); Assert.assertEquals(7, hireDate.get(Calendar.MONTH)); Assert.assertEquals(1, hireDate.get(Calendar.DATE)); Calendar terminationDate = employmentRecord.getTerminationDate(); Assert.assertEquals(2012, terminationDate.get(Calendar.YEAR)); Assert.assertEquals(6, terminationDate.get(Calendar.MONTH)); Assert.assertEquals(31, terminationDate.get(Calendar.DATE)); Assert.assertEquals(20, employmentRecord.getTotalYearsExperience().intValue()); Assert.assertEquals("Senior Staff", employmentRecord.getPositionTitle()); Assert.assertEquals("10", employmentRecord.getPositionNumber()); Calendar seniorityDate = employmentRecord.getSeniorityDate(); Assert.assertEquals(2011, seniorityDate.get(Calendar.YEAR)); Assert.assertEquals(1, seniorityDate.get(Calendar.MONTH)); Assert.assertEquals(1, seniorityDate.get(Calendar.DATE)); Calendar tenureDate = employmentRecord.getTenureDate(); Assert.assertEquals(2011, tenureDate.get(Calendar.YEAR)); Assert.assertEquals(7, tenureDate.get(Calendar.MONTH)); Assert.assertEquals(1, tenureDate.get(Calendar.DATE)); }
public static EmploymentRecord generateTestEmploymentRecord() { EmploymentRecord employmentRecord = new EmploymentRecord(); employmentRecord.setRefId(TEST_EMPLOYMENTRECORD_REFID); employmentRecord.setSIF_RefId(TEST_STAFFPERSONAL_REFID); employmentRecord.setSIF_RefObject("StaffPersonal"); employmentRecord.setLEAInfoRefId(TEST_LEAINFO_REFID); employmentRecord.setActive(true); employmentRecord.setFullTimeStatus(FullTimeStatus.FULLTIME); employmentRecord.setHireDate(new GregorianCalendar(2010, 7, 1)); employmentRecord.setTerminationDate(new GregorianCalendar(2012, 6, 31)); employmentRecord.setTotalYearsExperience(20); employmentRecord.setPositionTitle("Senior Staff"); employmentRecord.setPositionNumber("10"); employmentRecord.setSeniorityDate(new GregorianCalendar(2011, 1, 1)); employmentRecord.setTenureDate(new GregorianCalendar(2011, 7, 1)); return employmentRecord; }
SifEntityGenerator { public static EmploymentRecord generateTestEmploymentRecord() { EmploymentRecord employmentRecord = new EmploymentRecord(); employmentRecord.setRefId(TEST_EMPLOYMENTRECORD_REFID); employmentRecord.setSIF_RefId(TEST_STAFFPERSONAL_REFID); employmentRecord.setSIF_RefObject("StaffPersonal"); employmentRecord.setLEAInfoRefId(TEST_LEAINFO_REFID); employmentRecord.setActive(true); employmentRecord.setFullTimeStatus(FullTimeStatus.FULLTIME); employmentRecord.setHireDate(new GregorianCalendar(2010, 7, 1)); employmentRecord.setTerminationDate(new GregorianCalendar(2012, 6, 31)); employmentRecord.setTotalYearsExperience(20); employmentRecord.setPositionTitle("Senior Staff"); employmentRecord.setPositionNumber("10"); employmentRecord.setSeniorityDate(new GregorianCalendar(2011, 1, 1)); employmentRecord.setTenureDate(new GregorianCalendar(2011, 7, 1)); return employmentRecord; } }
SifEntityGenerator { public static EmploymentRecord generateTestEmploymentRecord() { EmploymentRecord employmentRecord = new EmploymentRecord(); employmentRecord.setRefId(TEST_EMPLOYMENTRECORD_REFID); employmentRecord.setSIF_RefId(TEST_STAFFPERSONAL_REFID); employmentRecord.setSIF_RefObject("StaffPersonal"); employmentRecord.setLEAInfoRefId(TEST_LEAINFO_REFID); employmentRecord.setActive(true); employmentRecord.setFullTimeStatus(FullTimeStatus.FULLTIME); employmentRecord.setHireDate(new GregorianCalendar(2010, 7, 1)); employmentRecord.setTerminationDate(new GregorianCalendar(2012, 6, 31)); employmentRecord.setTotalYearsExperience(20); employmentRecord.setPositionTitle("Senior Staff"); employmentRecord.setPositionNumber("10"); employmentRecord.setSeniorityDate(new GregorianCalendar(2011, 1, 1)); employmentRecord.setTenureDate(new GregorianCalendar(2011, 7, 1)); return employmentRecord; }  }
SifEntityGenerator { public static EmploymentRecord generateTestEmploymentRecord() { EmploymentRecord employmentRecord = new EmploymentRecord(); employmentRecord.setRefId(TEST_EMPLOYMENTRECORD_REFID); employmentRecord.setSIF_RefId(TEST_STAFFPERSONAL_REFID); employmentRecord.setSIF_RefObject("StaffPersonal"); employmentRecord.setLEAInfoRefId(TEST_LEAINFO_REFID); employmentRecord.setActive(true); employmentRecord.setFullTimeStatus(FullTimeStatus.FULLTIME); employmentRecord.setHireDate(new GregorianCalendar(2010, 7, 1)); employmentRecord.setTerminationDate(new GregorianCalendar(2012, 6, 31)); employmentRecord.setTotalYearsExperience(20); employmentRecord.setPositionTitle("Senior Staff"); employmentRecord.setPositionNumber("10"); employmentRecord.setSeniorityDate(new GregorianCalendar(2011, 1, 1)); employmentRecord.setTenureDate(new GregorianCalendar(2011, 7, 1)); return employmentRecord; }  static SchoolInfo generateTestSchoolInfo(); static LEAInfo generateTestLEAInfo(); static SEAInfo generateTestSEAInfo(); static StudentSchoolEnrollment generateTestStudentSchoolEnrollment(); static StudentLEARelationship generateTestStudentLeaRelationship(); static StudentPersonal generateTestStudentPersonal(); static StaffPersonal generateTestStaffPersonal(); static EmployeePersonal generateTestEmployeePersonal(); static StaffAssignment generateTestStaffAssignment(); static EmploymentRecord generateTestEmploymentRecord(); static EmployeeAssignment generateTestEmployeeAssignment(); }
SifEntityGenerator { public static EmploymentRecord generateTestEmploymentRecord() { EmploymentRecord employmentRecord = new EmploymentRecord(); employmentRecord.setRefId(TEST_EMPLOYMENTRECORD_REFID); employmentRecord.setSIF_RefId(TEST_STAFFPERSONAL_REFID); employmentRecord.setSIF_RefObject("StaffPersonal"); employmentRecord.setLEAInfoRefId(TEST_LEAINFO_REFID); employmentRecord.setActive(true); employmentRecord.setFullTimeStatus(FullTimeStatus.FULLTIME); employmentRecord.setHireDate(new GregorianCalendar(2010, 7, 1)); employmentRecord.setTerminationDate(new GregorianCalendar(2012, 6, 31)); employmentRecord.setTotalYearsExperience(20); employmentRecord.setPositionTitle("Senior Staff"); employmentRecord.setPositionNumber("10"); employmentRecord.setSeniorityDate(new GregorianCalendar(2011, 1, 1)); employmentRecord.setTenureDate(new GregorianCalendar(2011, 7, 1)); return employmentRecord; }  static SchoolInfo generateTestSchoolInfo(); static LEAInfo generateTestLEAInfo(); static SEAInfo generateTestSEAInfo(); static StudentSchoolEnrollment generateTestStudentSchoolEnrollment(); static StudentLEARelationship generateTestStudentLeaRelationship(); static StudentPersonal generateTestStudentPersonal(); static StaffPersonal generateTestStaffPersonal(); static EmployeePersonal generateTestEmployeePersonal(); static StaffAssignment generateTestStaffAssignment(); static EmploymentRecord generateTestEmploymentRecord(); static EmployeeAssignment generateTestEmployeeAssignment(); static final String TEST_SCHOOLINFO_REFID; static final String TEST_LEAINFO_REFID; static final String TEST_SEAINFO_REFID; static final String TEST_STUDENTPERSONAL_REFID; static final String TEST_STUDENTSCHOOLENROLLMENT_REFID; static final String TEST_STUDENTLEARELATIONSHIP_REFID; static final String TEST_STAFFPERSONAL_REFID; static final String TEST_EMPLOYEEPERSONAL_REFID; static final String TEST_STAFFASSIGNMENT_REFID; static final String TEST_EMPLOYMENTRECORD_REFID; static final String TEST_EMPLOYEEASSIGNMENT_REFID; }