@Test public void runReportStudentPersonalEventTests() throws ADKException { Class<? extends SIFDataObject> expectedClass = StudentPersonal.class; String expectedId = SifEntityGenerator.TEST_STUDENTPERSONAL_REFID; EventAction eventAction = EventAction.ADD; Event sentEvent = eventReporter.reportStudentPersonalEvent(eventAction); StudentPersonal dataObject = (StudentPersonal) runDataObjectEventTest(sentEvent, eventAction, expectedClass, expectedId, false); Assert.assertEquals(YesNoUnknown.NO.getValue(), dataObject.getMigrant()); eventAction = EventAction.CHANGE; sentEvent = eventReporter.reportStudentPersonalEvent(eventAction); dataObject = (StudentPersonal) runDataObjectEventTest(sentEvent, eventAction, expectedClass, expectedId, true); Assert.assertEquals(YesNoUnknown.UNKNOWN.getValue(), dataObject.getMigrant()); eventAction = EventAction.DELETE; sentEvent = eventReporter.reportStudentPersonalEvent(eventAction); dataObject = (StudentPersonal) runDataObjectEventTest(sentEvent, eventAction, expectedClass, expectedId, false); Assert.assertEquals(YesNoUnknown.NO.getValue(), dataObject.getMigrant()); }
public Event reportStudentPersonalEvent(EventAction action) throws ADKException { LOG.info("StudentPersonal " + action.toString()); StudentPersonal studentPersonal = SifEntityGenerator.generateTestStudentPersonal(); if (action == EventAction.CHANGE) { studentPersonal.setChanged(); studentPersonal.setMigrant(YesNoUnknown.UNKNOWN); } Event event = new Event(studentPersonal, action); zone.reportEvent(event); return event; }
EventReporter implements Publisher { public Event reportStudentPersonalEvent(EventAction action) throws ADKException { LOG.info("StudentPersonal " + action.toString()); StudentPersonal studentPersonal = SifEntityGenerator.generateTestStudentPersonal(); if (action == EventAction.CHANGE) { studentPersonal.setChanged(); studentPersonal.setMigrant(YesNoUnknown.UNKNOWN); } Event event = new Event(studentPersonal, action); zone.reportEvent(event); return event; } }
EventReporter implements Publisher { public Event reportStudentPersonalEvent(EventAction action) throws ADKException { LOG.info("StudentPersonal " + action.toString()); StudentPersonal studentPersonal = SifEntityGenerator.generateTestStudentPersonal(); if (action == EventAction.CHANGE) { studentPersonal.setChanged(); studentPersonal.setMigrant(YesNoUnknown.UNKNOWN); } Event event = new Event(studentPersonal, action); zone.reportEvent(event); return event; } EventReporter(Zone zone); }
EventReporter implements Publisher { public Event reportStudentPersonalEvent(EventAction action) throws ADKException { LOG.info("StudentPersonal " + action.toString()); StudentPersonal studentPersonal = SifEntityGenerator.generateTestStudentPersonal(); if (action == EventAction.CHANGE) { studentPersonal.setChanged(); studentPersonal.setMigrant(YesNoUnknown.UNKNOWN); } Event event = new Event(studentPersonal, 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 reportStudentPersonalEvent(EventAction action) throws ADKException { LOG.info("StudentPersonal " + action.toString()); StudentPersonal studentPersonal = SifEntityGenerator.generateTestStudentPersonal(); if (action == EventAction.CHANGE) { studentPersonal.setChanged(); studentPersonal.setMigrant(YesNoUnknown.UNKNOWN); } Event event = new Event(studentPersonal, 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; }