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

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


   * Test method for 'com.google.checkout.sample.protocol.CheckoutCartBuilder.createAllowedAreasByStates(List<USStateArea>)'
   */
  public void testCreateAllowedAreasByStates() throws Exception {
    CheckoutCartBuilder pBuilder = CheckoutCartBuilder.getInstance();
    List<USStateArea> usStateAreas = makeUSState();
    AllowedAreas allowed = pBuilder.createAllowedAreasByStates(usStateAreas);
    List<Object> testList = allowed.getUsStateAreaOrUsZipAreaOrUsCountryArea();
   
    assertNotNull(testList);
    assertEquals(testList.size(), usStateAreas.size());
  }
View Full Code Here


  public void testCreateShoppingCart() throws Exception {
    CheckoutCartBuilder pBuilder = CheckoutCartBuilder.getInstance();
    List<Item> cartItems = makeCartItems();
    int cartSize = cartItems.size();
    Date cartExpiry = new Date(System.currentTimeMillis() + 3600000L);
    ShoppingCart cart = pBuilder.createShoppingCart(cartItems, cartExpiry, null);
   
    assertNotNull(cart);
    assertEquals(cart.getItems().getItem().size(), cartSize);
    assertNull(cart.getMerchantPrivateData());
  }
View Full Code Here

   */
  public Document addTrackingData(String orderNumber, String trackNumber,
      String courier) throws ProtocolException {
    AddTrackingDataRequest addTrackingDataRequest
        = _objectFact.createAddTrackingDataRequest();
    TrackingData trackData = _objectFact.createTrackingData();
    trackData.setTrackingNumber(trackNumber);
    trackData.setCarrier(courier);
    addTrackingDataRequest.setTrackingData(trackData);
    addTrackingDataRequest.setGoogleOrderNumber(orderNumber);
    JAXBElement<AddTrackingDataRequest> addTrackingData
        = _objectFact.createAddTrackingData(addTrackingDataRequest);
    return convertToDOM(addTrackingData);
View Full Code Here

   */
  public Document trackOrder(String orderNumber, String trackNumber,
      String courier, boolean toEmail) throws ProtocolException {
    DeliverOrderRequest deliveryRequest
        = createOrderDelivery(orderNumber, toEmail);
    TrackingData trackData = _objectFact.createTrackingData();
    trackData.setTrackingNumber(trackNumber);
    trackData.setCarrier(courier);
    deliveryRequest.setTrackingData(trackData);
    JAXBElement<DeliverOrderRequest> deliverRequest
        = _objectFact.createDeliverOrder(deliveryRequest);
    return convertToDOM(deliverRequest);
  }
View Full Code Here

    assertNull(cart.getMerchantPrivateData());
  }

  private List<USStateArea> makeUSState() throws Exception {
    CheckoutCartBuilder pBuilder = CheckoutCartBuilder.getInstance();
    USStateArea caState = pBuilder.createStateArea("ca");
    USStateArea nyState = pBuilder.createStateArea("ny");
    List<USStateArea> stateAreasList = new ArrayList<USStateArea>();
    stateAreasList.add(caState);
    stateAreasList.add(nyState);
    return stateAreasList;
  }
View Full Code Here

   * Google Checkout to move the order back into the merchant's Inbox
   * in the Google Checkout Merchant Center.
   * @param orderNumber Google Checkout-assigned order number
   */
  public Document unarchiveOrder(String orderNumber) throws ProtocolException {
    UnarchiveOrderRequest unArchiveReqeust
        = _objectFact.createUnarchiveOrderRequest();
    unArchiveReqeust.setGoogleOrderNumber(orderNumber);
    JAXBElement<UnarchiveOrderRequest> unArchiveOrder
        = _objectFact.createUnarchiveOrder(unArchiveReqeust);
    return convertToDOM(unArchiveOrder);
  }
View Full Code Here

    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 {
        Assert.fail( "Unknown TransportType: " + transportType );
      }
View Full Code Here

    return service;
  }

  protected int submitRequest(ICorrespondenceAgencyExternalBasic port, InsertCorrespondenceV2 request, CorrespondenceMessage msg) {

    ReceiptExternal response;
    try {
      response = port.insertCorrespondenceBasicV2(settings.getSystemUserName(), settings.getSystemPassword(), settings.getSystemUserCode(), msg.getExternalReference(), request);
      if (!ReceiptStatusEnum.OK.equals(response.getReceiptStatusCode()))
        throw new AltinnException("Status was not ok: receiptID " + response.getReceiptId() + " status " + response.getReceiptStatusCode());

    } catch (ICorrespondenceAgencyExternalBasicInsertCorrespondenceBasicV2AltinnFaultFaultFaultMessage e) {
      throw new AltinnException(getAltinnFaultMessage(e), e);
    }
    return response.getReceiptId();
  }
View Full Code Here

  @Override
  protected int submitRequest( ICorrespondenceAgencyExternalBasic port, InsertCorrespondenceV2 request, CorrespondenceMessage message ) {
    Assert.assertEquals( settings.getServiceCode(), request.getServiceCode() );
    Assert.assertEquals( settings.getServiceEdition(), request.getServiceEdition() );
    Assert.assertEquals( message.getOrgNr(), request.getReportee() );
    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 )) {
View Full Code Here

    insertCorrespondence.setNotifications(createMessageNotification(notificationEmail));
    return insertCorrespondence;
  }

  private ExternalContentV2 createContent(CorrespondenceMessage msg) {
    ExternalContentV2 externalContent = new ExternalContentV2();
    externalContent.setLanguageCode(settings.getLanguageCode());
    externalContent.setMessageTitle(msg.getMessageTitle());
    externalContent.setMessageBody(msg.getMessageBody());
    externalContent.setMessageSummary(msg.getMessageSummary());
    return externalContent;
  }
View Full Code Here

TOP

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

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.