Package org.mule.api.processor

Examples of org.mule.api.processor.MessageProcessor.process()


  @Before
  public void setUp() {
    try {
      testObjects = (HashMap<String, Object>) context.getBean("deleteProduct");
      MessageProcessor createProductFlow = lookupFlowConstruct("create-product");
      MuleEvent response = createProductFlow.process(getTestEvent(testObjects));
      response.getMessage().getPayload();
      testObjects.put("productId", response.getMessage().getPayload());
    }
    catch (Exception e) {
      e.printStackTrace();
View Full Code Here


  @Test
  public void testDeleteProductByProductId() {
    try {
      MessageProcessor flow = lookupFlowConstruct("delete-product-by-product-id");
     
      MuleEvent response = flow.process(getTestEvent(testObjects));
      Integer deleteResult = (Integer) response.getMessage().getPayload();
      assertNotNull(deleteResult);
    }
    catch (Exception e) {
      e.printStackTrace();
View Full Code Here

  @Test
  public void testDeleteProductByProductSku() {
    try {
      MessageProcessor flow = lookupFlowConstruct("delete-product-by-product-sku");
     
      MuleEvent response = flow.process(getTestEvent(testObjects));
      Integer deleteResult = (Integer) response.getMessage().getPayload();
      assertNotNull(deleteResult);
    }
    catch (Exception e) {
      e.printStackTrace();
View Full Code Here

  public void testListCustomerAddresses() {
    try {
      List<Integer> addressIds = (List<Integer>) testObjects.get("addressIds");
     
      MessageProcessor flow = lookupFlowConstruct("list-customer-addresses");
      MuleEvent event = flow.process(getTestEvent(testObjects));
     
      List<CustomerAddressEntityItem> customerAddresses = (List<CustomerAddressEntityItem>) event.getMessage().getPayload();
   
      assertTrue(customerAddresses.size() == addressIds.size());
      for (CustomerAddressEntityItem address : customerAddresses) {
View Full Code Here

  @Category({SmokeTests.class, RegressionTests.class})
  @Test
  public void testSetShoppingCartPaymentMethodTestCases() {
    try {
      MessageProcessor flow = lookupFlowConstruct("set-shopping-cart-payment-method");
      MuleEvent response = flow.process(getTestEvent(testObjects));
     
      Boolean result = (Boolean) response.getMessage().getPayload();
      assertTrue(result);
    }
    catch (Exception e) {
View Full Code Here

     
      testObjects.put("productIdOrSkusRef", productIdsFormatted);
     
      // Get the inventory
      MessageProcessor flow = lookupFlowConstruct("list-inventory-stock-items");
      MuleEvent response = flow.process(getTestEvent(testObjects));
   
      // Get the response and perform the assertions
      List<CatalogInventoryStockItemEntity> stockItems = (List<CatalogInventoryStockItemEntity>) response.getMessage().getPayload();
      assertNotNull(stockItems);
      assertTrue(productIds.size() == stockItems.size());
View Full Code Here

  @Test
  @Ignore
  public void testCancelOrderInvoice() {
    try {
      MessageProcessor flow = lookupFlowConstruct("cancel-order-invoice");
      MuleEvent response = flow.process(getTestEvent(testObjects));
     
      Boolean result = (Boolean) response.getMessage().getPayload();
      assertTrue(result);
    }
    catch (Exception e) {
View Full Code Here

  public void setUp() {
    try {
      testObjects = (HashMap<String, Object>) context.getBean("listProductAttributeMedia");

      MessageProcessor createProductFlow = lookupFlowConstruct("create-product");
      MuleEvent res = createProductFlow.process(getTestEvent(testObjects));
      Integer productId = (Integer) res.getMessage().getPayload();
      testObjects.put("productId", productId);
    } catch (Exception e) {
      e.printStackTrace();
      fail();
View Full Code Here

  @Category({RegressionTests.class })
  @Test
  public void testListProductAttributeMedia() {
    try {
      MessageProcessor listProductLinkFlow = lookupFlowConstruct("list-product-attribute-media");
      MuleEvent res = listProductLinkFlow.process(getTestEvent(testObjects));
      List<CatalogProductImageEntity> catalogProductImageEntities = (List<CatalogProductImageEntity>) res.getMessage().getPayload();
     
      assertNotNull(catalogProductImageEntities);
     
    } catch (Exception e) {
View Full Code Here

      CustomerCustomerEntityToCreate customerAfter = (CustomerCustomerEntityToCreate) testObjects.get("customerAfter");
     
      testObjects.put("customerRef", customerAfter);
     
      MessageProcessor flow = lookupFlowConstruct("update-customer");
      MuleEvent response = flow.process(getTestEvent(testObjects));

      boolean result = (Boolean) response.getMessage().getPayload();   
      assertTrue(result);
    }
    catch (Exception e) {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.