@Test public void shouldRaiseUpcomingAlertActionsForDueWindowAlerts() throws Exception { HashMap<String, String> extraData = new HashMap<>(); extraData.put("beneficiaryType", "mother"); reminderAction.invoke( event( "Case 1", "Schedule 1", "Milestone 1", WindowName.earliest, dueWindowStart, lateWindowStart, maxWindowStart), extraData); verify(actionService) .alertForBeneficiary( mother, "Case 1", "Schedule 1", "Milestone 1", upcoming, dueWindowStart, lateWindowStart); }
@Test public void shouldRaiseUrgentAlertActionsForLateWindowAlerts() throws Exception { HashMap<String, String> extraData = new HashMap<>(); extraData.put("beneficiaryType", "child"); reminderAction.invoke( event( "Case 1", "Schedule 1", "Milestone 1", WindowName.late, dueWindowStart, lateWindowStart, maxWindowStart), extraData); verify(actionService) .alertForBeneficiary( child, "Case 1", "Schedule 1", "Milestone 1", urgent, lateWindowStart, maxWindowStart); }