@Test public void testGenerateTestStudentPersonal() { StudentPersonal studentPersonal = SifEntityGenerator.generateTestStudentPersonal(); Assert.assertEquals(SifEntityGenerator.TEST_STUDENTPERSONAL_REFID, studentPersonal.getRefId()); Assert.assertEquals("1982", studentPersonal.getGraduationDate().getValue()); Assert.assertEquals(YesNoUnknown.NO.getValue(), studentPersonal.getMigrant()); Name name = studentPersonal.getName(); Assert.assertEquals(NameType.NAME_OF_RECORD.getValue(), name.getType()); Assert.assertEquals("Smith", name.getLastName()); Assert.assertEquals("Joe", name.getFirstName()); Assert.assertEquals("", name.getMiddleName()); Assert.assertEquals("Joe", name.getPreferredName()); EmailList emailList = studentPersonal.getEmailList(); Assert.assertEquals(1, emailList.size()); Email email = emailList.get(0); Assert.assertEquals(EmailType.PRIMARY.getValue(), email.getType()); Assert.assertEquals("joe.student@anyschool.edu", email.getValue()); Demographics demographics = studentPersonal.getDemographics(); Assert.assertEquals(CitizenshipStatus.USCITIZEN.getValue(), demographics.getCitizenshipStatus()); Assert.assertEquals(CountryCode.US.getValue(), demographics.getCountryOfBirth()); Assert.assertEquals(StatePrCode.AK.getValue(), demographics.getStateOfBirth()); Calendar birthDate = demographics.getBirthDate(); Assert.assertEquals(1981, birthDate.get(Calendar.YEAR)); Assert.assertEquals(11, birthDate.get(Calendar.MONTH)); Assert.assertEquals(20, birthDate.get(Calendar.DATE)); StudentAddressList addressList = studentPersonal.getAddressList(); Assert.assertEquals(1, addressList.size()); Address address = addressList.get(0); Assert.assertEquals("Salt Lake City", address.getCity()); Assert.assertEquals(StatePrCode.IL.getValue(), address.getStateProvince()); Assert.assertEquals(CountryCode.US.getValue(), address.getCountry()); Assert.assertEquals("84102", address.getPostalCode()); Assert.assertEquals(AddressType.MAILING.getValue(), address.getType()); Street street = address.getStreet(); Assert.assertEquals("1 IBM Plaza", street.getLine1()); Assert.assertEquals("2000", street.getApartmentNumber()); Assert.assertEquals("Suite 2000", street.getLine2()); Assert.assertEquals("Salt Lake City, IL 84102", street.getLine3()); Assert.assertEquals("IBM way", street.getStreetName()); Assert.assertEquals("1", street.getStreetNumber()); Assert.assertEquals("Plaza", street.getStreetType()); Assert.assertEquals("Suite", street.getApartmentType()); PhoneNumberList phoneNumberList = studentPersonal.getPhoneNumberList(); Assert.assertEquals(1, phoneNumberList.size()); PhoneNumber phoneNumber = phoneNumberList.get(0); Assert.assertEquals(PhoneNumberType.PRIMARY.getValue(), phoneNumber.getType()); Assert.assertEquals("(312) 555-1234", phoneNumber.getNumber()); }
public static StudentPersonal generateTestStudentPersonal() { StudentPersonal studentPersonal = new StudentPersonal(); studentPersonal.setRefId(TEST_STUDENTPERSONAL_REFID); studentPersonal.setStateProvinceId("IL-DAYBREAK-54321"); Name name = new Name(NameType.NAME_OF_RECORD, "Smith", "Joe"); name.setMiddleName(""); name.setPreferredName("Joe"); studentPersonal.setName(name); EmailList emailList = new EmailList(); emailList.addEmail(EmailType.PRIMARY, "joe.student@anyschool.edu"); studentPersonal.setEmailList(emailList); studentPersonal.setGraduationDate("1982"); Demographics demographics = new Demographics(); Calendar calendar = Calendar.getInstance(); calendar.set(1981, 11, 20); demographics.setBirthDate(calendar); demographics.setCitizenshipStatus(CitizenshipStatus.USCITIZEN); demographics.setCountryOfBirth(CountryCode.US); demographics.setStateOfBirth(StatePrCode.AK); demographics.setGender(Gender.MALE); studentPersonal.setDemographics(demographics); Address address = new Address(); address.setCity("Salt Lake City"); address.setStateProvince(StatePrCode.IL); address.setCountry(CountryCode.US); address.setPostalCode("84102"); Street street = new Street(); street.setLine1("1 IBM Plaza"); street.setApartmentNumber("2000"); street.setLine2("Suite 2000"); street.setLine3("Salt Lake City, IL 84102"); street.setStreetName("IBM way"); street.setStreetNumber("1"); street.setStreetType("Plaza"); street.setApartmentType("Suite"); address.setStreet(street); address.setType(AddressType.MAILING); StudentAddressList addressList = new StudentAddressList(); addressList.add(address); studentPersonal.setAddressList(addressList); PhoneNumberList phoneNumberList = new PhoneNumberList(); phoneNumberList.addPhoneNumber(PhoneNumberType.PRIMARY, "(312) 555-1234"); studentPersonal.setPhoneNumberList(phoneNumberList); studentPersonal.setMigrant(YesNoUnknown.NO); return studentPersonal; }
SifEntityGenerator { public static StudentPersonal generateTestStudentPersonal() { StudentPersonal studentPersonal = new StudentPersonal(); studentPersonal.setRefId(TEST_STUDENTPERSONAL_REFID); studentPersonal.setStateProvinceId("IL-DAYBREAK-54321"); Name name = new Name(NameType.NAME_OF_RECORD, "Smith", "Joe"); name.setMiddleName(""); name.setPreferredName("Joe"); studentPersonal.setName(name); EmailList emailList = new EmailList(); emailList.addEmail(EmailType.PRIMARY, "joe.student@anyschool.edu"); studentPersonal.setEmailList(emailList); studentPersonal.setGraduationDate("1982"); Demographics demographics = new Demographics(); Calendar calendar = Calendar.getInstance(); calendar.set(1981, 11, 20); demographics.setBirthDate(calendar); demographics.setCitizenshipStatus(CitizenshipStatus.USCITIZEN); demographics.setCountryOfBirth(CountryCode.US); demographics.setStateOfBirth(StatePrCode.AK); demographics.setGender(Gender.MALE); studentPersonal.setDemographics(demographics); Address address = new Address(); address.setCity("Salt Lake City"); address.setStateProvince(StatePrCode.IL); address.setCountry(CountryCode.US); address.setPostalCode("84102"); Street street = new Street(); street.setLine1("1 IBM Plaza"); street.setApartmentNumber("2000"); street.setLine2("Suite 2000"); street.setLine3("Salt Lake City, IL 84102"); street.setStreetName("IBM way"); street.setStreetNumber("1"); street.setStreetType("Plaza"); street.setApartmentType("Suite"); address.setStreet(street); address.setType(AddressType.MAILING); StudentAddressList addressList = new StudentAddressList(); addressList.add(address); studentPersonal.setAddressList(addressList); PhoneNumberList phoneNumberList = new PhoneNumberList(); phoneNumberList.addPhoneNumber(PhoneNumberType.PRIMARY, "(312) 555-1234"); studentPersonal.setPhoneNumberList(phoneNumberList); studentPersonal.setMigrant(YesNoUnknown.NO); return studentPersonal; } }
SifEntityGenerator { public static StudentPersonal generateTestStudentPersonal() { StudentPersonal studentPersonal = new StudentPersonal(); studentPersonal.setRefId(TEST_STUDENTPERSONAL_REFID); studentPersonal.setStateProvinceId("IL-DAYBREAK-54321"); Name name = new Name(NameType.NAME_OF_RECORD, "Smith", "Joe"); name.setMiddleName(""); name.setPreferredName("Joe"); studentPersonal.setName(name); EmailList emailList = new EmailList(); emailList.addEmail(EmailType.PRIMARY, "joe.student@anyschool.edu"); studentPersonal.setEmailList(emailList); studentPersonal.setGraduationDate("1982"); Demographics demographics = new Demographics(); Calendar calendar = Calendar.getInstance(); calendar.set(1981, 11, 20); demographics.setBirthDate(calendar); demographics.setCitizenshipStatus(CitizenshipStatus.USCITIZEN); demographics.setCountryOfBirth(CountryCode.US); demographics.setStateOfBirth(StatePrCode.AK); demographics.setGender(Gender.MALE); studentPersonal.setDemographics(demographics); Address address = new Address(); address.setCity("Salt Lake City"); address.setStateProvince(StatePrCode.IL); address.setCountry(CountryCode.US); address.setPostalCode("84102"); Street street = new Street(); street.setLine1("1 IBM Plaza"); street.setApartmentNumber("2000"); street.setLine2("Suite 2000"); street.setLine3("Salt Lake City, IL 84102"); street.setStreetName("IBM way"); street.setStreetNumber("1"); street.setStreetType("Plaza"); street.setApartmentType("Suite"); address.setStreet(street); address.setType(AddressType.MAILING); StudentAddressList addressList = new StudentAddressList(); addressList.add(address); studentPersonal.setAddressList(addressList); PhoneNumberList phoneNumberList = new PhoneNumberList(); phoneNumberList.addPhoneNumber(PhoneNumberType.PRIMARY, "(312) 555-1234"); studentPersonal.setPhoneNumberList(phoneNumberList); studentPersonal.setMigrant(YesNoUnknown.NO); return studentPersonal; }  }
SifEntityGenerator { public static StudentPersonal generateTestStudentPersonal() { StudentPersonal studentPersonal = new StudentPersonal(); studentPersonal.setRefId(TEST_STUDENTPERSONAL_REFID); studentPersonal.setStateProvinceId("IL-DAYBREAK-54321"); Name name = new Name(NameType.NAME_OF_RECORD, "Smith", "Joe"); name.setMiddleName(""); name.setPreferredName("Joe"); studentPersonal.setName(name); EmailList emailList = new EmailList(); emailList.addEmail(EmailType.PRIMARY, "joe.student@anyschool.edu"); studentPersonal.setEmailList(emailList); studentPersonal.setGraduationDate("1982"); Demographics demographics = new Demographics(); Calendar calendar = Calendar.getInstance(); calendar.set(1981, 11, 20); demographics.setBirthDate(calendar); demographics.setCitizenshipStatus(CitizenshipStatus.USCITIZEN); demographics.setCountryOfBirth(CountryCode.US); demographics.setStateOfBirth(StatePrCode.AK); demographics.setGender(Gender.MALE); studentPersonal.setDemographics(demographics); Address address = new Address(); address.setCity("Salt Lake City"); address.setStateProvince(StatePrCode.IL); address.setCountry(CountryCode.US); address.setPostalCode("84102"); Street street = new Street(); street.setLine1("1 IBM Plaza"); street.setApartmentNumber("2000"); street.setLine2("Suite 2000"); street.setLine3("Salt Lake City, IL 84102"); street.setStreetName("IBM way"); street.setStreetNumber("1"); street.setStreetType("Plaza"); street.setApartmentType("Suite"); address.setStreet(street); address.setType(AddressType.MAILING); StudentAddressList addressList = new StudentAddressList(); addressList.add(address); studentPersonal.setAddressList(addressList); PhoneNumberList phoneNumberList = new PhoneNumberList(); phoneNumberList.addPhoneNumber(PhoneNumberType.PRIMARY, "(312) 555-1234"); studentPersonal.setPhoneNumberList(phoneNumberList); studentPersonal.setMigrant(YesNoUnknown.NO); return studentPersonal; }  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 StudentPersonal generateTestStudentPersonal() { StudentPersonal studentPersonal = new StudentPersonal(); studentPersonal.setRefId(TEST_STUDENTPERSONAL_REFID); studentPersonal.setStateProvinceId("IL-DAYBREAK-54321"); Name name = new Name(NameType.NAME_OF_RECORD, "Smith", "Joe"); name.setMiddleName(""); name.setPreferredName("Joe"); studentPersonal.setName(name); EmailList emailList = new EmailList(); emailList.addEmail(EmailType.PRIMARY, "joe.student@anyschool.edu"); studentPersonal.setEmailList(emailList); studentPersonal.setGraduationDate("1982"); Demographics demographics = new Demographics(); Calendar calendar = Calendar.getInstance(); calendar.set(1981, 11, 20); demographics.setBirthDate(calendar); demographics.setCitizenshipStatus(CitizenshipStatus.USCITIZEN); demographics.setCountryOfBirth(CountryCode.US); demographics.setStateOfBirth(StatePrCode.AK); demographics.setGender(Gender.MALE); studentPersonal.setDemographics(demographics); Address address = new Address(); address.setCity("Salt Lake City"); address.setStateProvince(StatePrCode.IL); address.setCountry(CountryCode.US); address.setPostalCode("84102"); Street street = new Street(); street.setLine1("1 IBM Plaza"); street.setApartmentNumber("2000"); street.setLine2("Suite 2000"); street.setLine3("Salt Lake City, IL 84102"); street.setStreetName("IBM way"); street.setStreetNumber("1"); street.setStreetType("Plaza"); street.setApartmentType("Suite"); address.setStreet(street); address.setType(AddressType.MAILING); StudentAddressList addressList = new StudentAddressList(); addressList.add(address); studentPersonal.setAddressList(addressList); PhoneNumberList phoneNumberList = new PhoneNumberList(); phoneNumberList.addPhoneNumber(PhoneNumberType.PRIMARY, "(312) 555-1234"); studentPersonal.setPhoneNumberList(phoneNumberList); studentPersonal.setMigrant(YesNoUnknown.NO); return studentPersonal; }  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; }