@Test public void runReportEmployeeAssignmentEventTests() throws ADKException { Class<? extends SIFDataObject> expectedClass = EmployeeAssignment.class; String expectedId = SifEntityGenerator.TEST_EMPLOYEEASSIGNMENT_REFID; EventAction eventAction = EventAction.ADD; Event sentEvent = eventReporter.reportEmployeeAssignmentEvent(eventAction); EmployeeAssignment dataObject = (EmployeeAssignment) runDataObjectEventTest(sentEvent, eventAction, expectedClass, expectedId, false); Assert.assertEquals(YesNo.YES.getValue(), dataObject.getPrimaryAssignment()); eventAction = EventAction.CHANGE; sentEvent = eventReporter.reportEmployeeAssignmentEvent(eventAction); dataObject = (EmployeeAssignment) runDataObjectEventTest(sentEvent, eventAction, expectedClass, expectedId, true); Assert.assertEquals(YesNo.NO.getValue(), dataObject.getPrimaryAssignment()); eventAction = EventAction.DELETE; sentEvent = eventReporter.reportEmployeeAssignmentEvent(eventAction); dataObject = (EmployeeAssignment) runDataObjectEventTest(sentEvent, eventAction, expectedClass, expectedId, false); Assert.assertEquals(YesNo.YES.getValue(), dataObject.getPrimaryAssignment()); }
public Event reportEmployeeAssignmentEvent(EventAction action) throws ADKException { LOG.info("EmployeeAssignment " + action.toString()); EmployeeAssignment employeeAssignment = SifEntityGenerator.generateTestEmployeeAssignment(); if (action == EventAction.CHANGE) { employeeAssignment.setChanged(); employeeAssignment.setPrimaryAssignment(YesNo.NO); } Event event = new Event(employeeAssignment, action); zone.reportEvent(event); return event; }
EventReporter implements Publisher { public Event reportEmployeeAssignmentEvent(EventAction action) throws ADKException { LOG.info("EmployeeAssignment " + action.toString()); EmployeeAssignment employeeAssignment = SifEntityGenerator.generateTestEmployeeAssignment(); if (action == EventAction.CHANGE) { employeeAssignment.setChanged(); employeeAssignment.setPrimaryAssignment(YesNo.NO); } Event event = new Event(employeeAssignment, action); zone.reportEvent(event); return event; } }
EventReporter implements Publisher { public Event reportEmployeeAssignmentEvent(EventAction action) throws ADKException { LOG.info("EmployeeAssignment " + action.toString()); EmployeeAssignment employeeAssignment = SifEntityGenerator.generateTestEmployeeAssignment(); if (action == EventAction.CHANGE) { employeeAssignment.setChanged(); employeeAssignment.setPrimaryAssignment(YesNo.NO); } Event event = new Event(employeeAssignment, action); zone.reportEvent(event); return event; } EventReporter(Zone zone); }
EventReporter implements Publisher { public Event reportEmployeeAssignmentEvent(EventAction action) throws ADKException { LOG.info("EmployeeAssignment " + action.toString()); EmployeeAssignment employeeAssignment = SifEntityGenerator.generateTestEmployeeAssignment(); if (action == EventAction.CHANGE) { employeeAssignment.setChanged(); employeeAssignment.setPrimaryAssignment(YesNo.NO); } Event event = new Event(employeeAssignment, 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 reportEmployeeAssignmentEvent(EventAction action) throws ADKException { LOG.info("EmployeeAssignment " + action.toString()); EmployeeAssignment employeeAssignment = SifEntityGenerator.generateTestEmployeeAssignment(); if (action == EventAction.CHANGE) { employeeAssignment.setChanged(); employeeAssignment.setPrimaryAssignment(YesNo.NO); } Event event = new Event(employeeAssignment, 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; }