コード例 #1
0
  @Test
  public void deliveryAssignmentEmailNotificationTest_Supplement() throws MitchellException {
    try {
      APDDeliveryContextDocument aPDDeliveryContextDocument =
          APDDeliveryContextDocument.Factory.parse(
              new File("src/test/resources/APDDeliveryContextDocument.xml"));
      aPDDeliveryContextDocument.getAPDDeliveryContext().setMessageType("SUPPLEMENT");
      asgEmailDelService.deliveryAssignmentEmailNotification(
          aPDDeliveryContextDocument, new ArrayList<String>(), "IA_PREMIUM_EMAIL_TYPE");
      Mockito.when(cultureDAO.getCultureByCompany(Mockito.anyString())).thenReturn(null);
      Mockito.verify(assignmentEmailDeliveryHandlerDRP, Mockito.never())
          .deliverIAEmail(aPDDeliveryContextDocument, true, "en-US");

    } catch (XmlException e) {
      e.printStackTrace();
    } catch (IOException e) {
      e.printStackTrace();
    }
  }
コード例 #2
0
  @Test
  public void deliveryAssignmentEmailNotificationTest_Original_Basic() throws MitchellException {
    try {
      APDDeliveryContextDocument aPDDeliveryContextDocument =
          APDDeliveryContextDocument.Factory.parse(
              new File("src/test/resources/APDDeliveryContextDocument.xml"));
      Mockito.doNothing()
          .when(assignmentEmailDeliveryHandler)
          .deliverIAEmail(
              (APDDeliveryContextDocument) Mockito.anyObject(),
              Mockito.anyBoolean(),
              Mockito.anyString());
      asgEmailDelService.deliveryAssignmentEmailNotification(
          aPDDeliveryContextDocument, new ArrayList<String>(), "IA_BASIC_EMAIL_TYPE");
      Mockito.when(cultureDAO.getCultureByCompany(Mockito.anyString())).thenReturn(null);
      Mockito.verify(assignmentEmailDeliveryHandler)
          .deliverIAEmail(aPDDeliveryContextDocument, true, "en-US");

    } catch (XmlException e) {
      e.printStackTrace();
    } catch (IOException e) {
      e.printStackTrace();
    }
  }