@Test public void runReportStaffPersonalEventTests() throws ADKException { Class<? extends SIFDataObject> expectedClass = StaffPersonal.class; String expectedId = SifEntityGenerator.TEST_STAFFPERSONAL_REFID; EventAction eventAction = EventAction.ADD; Event sentEvent = eventReporter.reportStaffPersonalEvent(eventAction); StaffPersonal dataObject = (StaffPersonal) runDataObjectEventTest(sentEvent, eventAction, expectedClass, expectedId, false); String emailAddress = dataObject.getEmailList().get(0).getValue(); Assert.assertEquals("chuckw@imginc.com", emailAddress); eventAction = EventAction.CHANGE; sentEvent = eventReporter.reportStaffPersonalEvent(eventAction); dataObject = (StaffPersonal) runDataObjectEventTest(sentEvent, eventAction, expectedClass, expectedId, true); emailAddress = dataObject.getEmailList().get(0).getValue(); Assert.assertEquals("chuckyw@imginc.com", emailAddress); eventAction = EventAction.DELETE; sentEvent = eventReporter.reportStaffPersonalEvent(eventAction); dataObject = (StaffPersonal) runDataObjectEventTest(sentEvent, eventAction, expectedClass, expectedId, false); emailAddress = dataObject.getEmailList().get(0).getValue(); Assert.assertEquals("chuckw@imginc.com", emailAddress); }
public Event reportStaffPersonalEvent(EventAction action) throws ADKException { LOG.info("StaffPersonal " + action.toString()); StaffPersonal staffPersonal = SifEntityGenerator.generateTestStaffPersonal(); if (action == EventAction.CHANGE) { staffPersonal.setChanged(); staffPersonal.setEmailList(new EmailList(new Email(EmailType.PRIMARY, "chuckyw@imginc.com"))); } Event event = new Event(staffPersonal, action); zone.reportEvent(event); return event; }
EventReporter implements Publisher { public Event reportStaffPersonalEvent(EventAction action) throws ADKException { LOG.info("StaffPersonal " + action.toString()); StaffPersonal staffPersonal = SifEntityGenerator.generateTestStaffPersonal(); if (action == EventAction.CHANGE) { staffPersonal.setChanged(); staffPersonal.setEmailList(new EmailList(new Email(EmailType.PRIMARY, "chuckyw@imginc.com"))); } Event event = new Event(staffPersonal, action); zone.reportEvent(event); return event; } }
EventReporter implements Publisher { public Event reportStaffPersonalEvent(EventAction action) throws ADKException { LOG.info("StaffPersonal " + action.toString()); StaffPersonal staffPersonal = SifEntityGenerator.generateTestStaffPersonal(); if (action == EventAction.CHANGE) { staffPersonal.setChanged(); staffPersonal.setEmailList(new EmailList(new Email(EmailType.PRIMARY, "chuckyw@imginc.com"))); } Event event = new Event(staffPersonal, action); zone.reportEvent(event); return event; } EventReporter(Zone zone); }
EventReporter implements Publisher { public Event reportStaffPersonalEvent(EventAction action) throws ADKException { LOG.info("StaffPersonal " + action.toString()); StaffPersonal staffPersonal = SifEntityGenerator.generateTestStaffPersonal(); if (action == EventAction.CHANGE) { staffPersonal.setChanged(); staffPersonal.setEmailList(new EmailList(new Email(EmailType.PRIMARY, "chuckyw@imginc.com"))); } Event event = new Event(staffPersonal, action); zone.reportEvent(event); return event; } EventReporter(Zone zone); static void main(String[] args); List<Event> runReportScript(String script, long waitTime); Event reportLeaInfoEvent(EventAction action); Event reportSchoolInfoEvent(EventAction action); Event reportStudentPersonalEvent(EventAction action); Event reportStudentLeaRelationshipEvent(EventAction action); Event reportStudentSchoolEnrollmentEvent(EventAction action); Event reportStaffPersonalEvent(EventAction action); Event reportEmployeePersonalEvent(EventAction action); Event reportStaffAssignmentEvent(EventAction action); Event reportEmploymentRecordEvent(EventAction action); Event reportEmployeeAssignmentEvent(EventAction action); Event reportEvent(String messageFile, String eventAction); @Override void onRequest(DataObjectOutputStream out, Query query, Zone zone, MessageInfo info); }
EventReporter implements Publisher { public Event reportStaffPersonalEvent(EventAction action) throws ADKException { LOG.info("StaffPersonal " + action.toString()); StaffPersonal staffPersonal = SifEntityGenerator.generateTestStaffPersonal(); if (action == EventAction.CHANGE) { staffPersonal.setChanged(); staffPersonal.setEmailList(new EmailList(new Email(EmailType.PRIMARY, "chuckyw@imginc.com"))); } Event event = new Event(staffPersonal, action); zone.reportEvent(event); return event; } EventReporter(Zone zone); static void main(String[] args); List<Event> runReportScript(String script, long waitTime); Event reportLeaInfoEvent(EventAction action); Event reportSchoolInfoEvent(EventAction action); Event reportStudentPersonalEvent(EventAction action); Event reportStudentLeaRelationshipEvent(EventAction action); Event reportStudentSchoolEnrollmentEvent(EventAction action); Event reportStaffPersonalEvent(EventAction action); Event reportEmployeePersonalEvent(EventAction action); Event reportStaffAssignmentEvent(EventAction action); Event reportEmploymentRecordEvent(EventAction action); Event reportEmployeeAssignmentEvent(EventAction action); Event reportEvent(String messageFile, String eventAction); @Override void onRequest(DataObjectOutputStream out, Query query, Zone zone, MessageInfo info); static final Logger LOG; }