@Test public void shouldNotEmailWhenRequisitionStatusNotAuthorized() throws Exception { rnr.setStatus(RnrStatus.SUBMITTED); requisitionEmailServiceForSIMAM.sendRequisitionEmailWithAttachment(rnr, users); verify(emailService, never()).insertEmailAttachmentList(anyList()); }
public void sendRequisitionEmailWithAttachment(Rnr requisition, List<User> users) { if (!requisition.getStatus().equals(RnrStatus.AUTHORIZED) || users.size() <= 0) { return; } insertEmailMessages(requisition, users); }
RequisitionEmailServiceForSIMAM { public void sendRequisitionEmailWithAttachment(Rnr requisition, List<User> users) { if (!requisition.getStatus().equals(RnrStatus.AUTHORIZED) || users.size() <= 0) { return; } insertEmailMessages(requisition, users); } }
RequisitionEmailServiceForSIMAM { public void sendRequisitionEmailWithAttachment(Rnr requisition, List<User> users) { if (!requisition.getStatus().equals(RnrStatus.AUTHORIZED) || users.size() <= 0) { return; } insertEmailMessages(requisition, users); }  }
RequisitionEmailServiceForSIMAM { public void sendRequisitionEmailWithAttachment(Rnr requisition, List<User> users) { if (!requisition.getStatus().equals(RnrStatus.AUTHORIZED) || users.size() <= 0) { return; } insertEmailMessages(requisition, users); }  void sendRequisitionEmailWithAttachment(Rnr requisition, List<User> users); EmailAttachment generateRequisitionExcelForSIMAM(Rnr requisition); }
RequisitionEmailServiceForSIMAM { public void sendRequisitionEmailWithAttachment(Rnr requisition, List<User> users) { if (!requisition.getStatus().equals(RnrStatus.AUTHORIZED) || users.size() <= 0) { return; } insertEmailMessages(requisition, users); }  void sendRequisitionEmailWithAttachment(Rnr requisition, List<User> users); EmailAttachment generateRequisitionExcelForSIMAM(Rnr requisition); static final String TEMPLATE_IMPORT_RNR_XLSX; static final String TEMPLATE_IMPORT_REGIMEN_XLSX; static final String TEMPLATE_IMPORT_REGIMEN_XLSX_EMPTY; static final String FILE_APPLICATION_VND_MS_EXCEL; static final String REGIMEN_FILE_NAME_PREFIX; static final String REQUI_FILE_NAME_PREFIX; static final String EMAIL_TEMPLATE_FOR_REQUISITION_ATTACHMENT_PREFIX; static final Map<String, String> SIMAM_PROGRAMS_MAP; }