Package org.openquark.cal.internal.runtime.lecc

Examples of org.openquark.cal.internal.runtime.lecc.RTPartialApp$_12$_10


    ExternalContentV2 content = request.getContent();
    Assert.assertEquals( message.getMessageTitle(), content.getMessageTitle() );
    Assert.assertEquals( message.getMessageBody(), content.getMessageBody() );
    Assert.assertEquals( message.getMessageSummary(), content.getMessageSummary() );
    Assert.assertEquals( settings.getLanguageCode(), content.getLanguageCode() );
    Notification notification = request.getNotifications().getNotification().get( 0 );
    List<ReceiverEndPoint> receiverEndPoints = notification.getReceiverEndPoints().getReceiverEndPoint();
    for (ReceiverEndPoint receiverEndPoint : receiverEndPoints) {
      TransportType transportType = receiverEndPoint.getTransportType();
      if (TransportType.EMAIL.equals( transportType )) {
      } else if (TransportType.SMS.equals( transportType )) {
      } else {
View Full Code Here


public class MessageNotificationTest {

    @Test
    public void testMessageNotificationContainsEmailAddressIfAddressNotNull() throws Exception {
        MessageNotification messageNotification = new MessageNotification(new CorrespondenceSettings(), "test@example.com");
        NotificationBEList notifications = messageNotification.getNotifications();

        assertEquals(1, notifications.getNotification().size());
        assertEquals(2, notifications.getNotification().get(0).getReceiverEndPoints().getReceiverEndPoint().size());

        ReceiverEndPoint smsEndpoint = notifications.getNotification().get(0).getReceiverEndPoints().getReceiverEndPoint().get(0);
        ReceiverEndPoint mailEndpoint = notifications.getNotification().get(0).getReceiverEndPoints().getReceiverEndPoint().get(1);

        assertEquals(TransportType.SMS, smsEndpoint.getTransportType());
        assertEquals("", smsEndpoint.getReceiverAddress());

        assertEquals(TransportType.EMAIL, mailEndpoint.getTransportType());
View Full Code Here

    }

    @Test
    public void testMessageNotificationContainsEmailEmptyStringIfAddressIsNull() throws Exception {
        MessageNotification messageNotification = new MessageNotification(new CorrespondenceSettings(), "");
        NotificationBEList notifications = messageNotification.getNotifications();

        assertEquals(1, notifications.getNotification().size());
        assertEquals(2, notifications.getNotification().get(0).getReceiverEndPoints().getReceiverEndPoint().size());

        ReceiverEndPoint smsEndpoint = notifications.getNotification().get(0).getReceiverEndPoints().getReceiverEndPoint().get(0);
        ReceiverEndPoint mailEndpoint = notifications.getNotification().get(0).getReceiverEndPoints().getReceiverEndPoint().get(1);

        assertEquals(TransportType.SMS, smsEndpoint.getTransportType());
        assertEquals("", smsEndpoint.getReceiverAddress());

        assertEquals(TransportType.EMAIL, mailEndpoint.getTransportType());
View Full Code Here

        NotificationBEList notifications = messageNotification.getNotifications();

        assertEquals(1, notifications.getNotification().size());
        assertEquals(2, notifications.getNotification().get(0).getReceiverEndPoints().getReceiverEndPoint().size());

        ReceiverEndPoint smsEndpoint = notifications.getNotification().get(0).getReceiverEndPoints().getReceiverEndPoint().get(0);
        ReceiverEndPoint mailEndpoint = notifications.getNotification().get(0).getReceiverEndPoints().getReceiverEndPoint().get(1);

        assertEquals(TransportType.SMS, smsEndpoint.getTransportType());
        assertEquals("", smsEndpoint.getReceiverAddress());

        assertEquals(TransportType.EMAIL, mailEndpoint.getTransportType());
        assertEquals("test@example.com", mailEndpoint.getReceiverAddress());
    }
View Full Code Here

        NotificationBEList notifications = messageNotification.getNotifications();

        assertEquals(1, notifications.getNotification().size());
        assertEquals(2, notifications.getNotification().get(0).getReceiverEndPoints().getReceiverEndPoint().size());

        ReceiverEndPoint smsEndpoint = notifications.getNotification().get(0).getReceiverEndPoints().getReceiverEndPoint().get(0);
        ReceiverEndPoint mailEndpoint = notifications.getNotification().get(0).getReceiverEndPoints().getReceiverEndPoint().get(1);

        assertEquals(TransportType.SMS, smsEndpoint.getTransportType());
        assertEquals("", smsEndpoint.getReceiverAddress());

        assertEquals(TransportType.EMAIL, mailEndpoint.getTransportType());
        assertEquals("", mailEndpoint.getReceiverAddress());
    }
View Full Code Here

    }
    return response.getReceiptId();
  }

  private String getAltinnFaultMessage(ICorrespondenceAgencyExternalBasicInsertCorrespondenceBasicV2AltinnFaultFaultFaultMessage f) {
    AltinnFault faultMessage = f.getFaultInfo();
    log.info("Error id:" + faultMessage.getErrorID() + "Error: " + faultMessage.getAltinnErrorMessage());
    return faultMessage.getAltinnErrorMessage();
  }
View Full Code Here

  public CorrespondenceClient(CorrespondenceSettings settings) {
    this.settings = settings;
  }

  public int send(CorrespondenceMessage msg, String notificationEmail) {
    ICorrespondenceAgencyExternalBasic port = createClientPort();
    InsertCorrespondenceV2 request = createRequest(msg, notificationEmail);
    request.setContent(createContent(msg));
    return submitRequest(port, request, msg);
  }
View Full Code Here

    externalContent.setMessageSummary(msg.getMessageSummary());
    return externalContent;
  }

  protected ICorrespondenceAgencyExternalBasic createClientPort() {
    ICorrespondenceAgencyExternalBasic service;
    JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean();
    factory.getInInterceptors().add(new LoggingInInterceptor());
    factory.getOutInterceptors().add(new LoggingOutInterceptor());
    factory.getOutInterceptors().add(new CdataWriterInterceptor("MessageBody"));
View Full Code Here

TOP

Related Classes of org.openquark.cal.internal.runtime.lecc.RTPartialApp$_12$_10

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.