Package org.mule.api.processor

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


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


  @Category({RegressionTests.class})
  @Test
  public void testGetCatalogCurrentStoreView() {
    try {
      MessageProcessor flow = lookupFlowConstruct("get-catalog-current-store-view");
      MuleEvent response = flow.process(getTestEvent(null));
     
      Integer defaultStoreId = (Integer) response.getMessage().getPayload();
      assertNotNull(defaultStoreId);
    }
    catch (Exception e) {
View Full Code Here

    try {
      int parentCategoryId = (Integer) testObjects.get("parentCategoryId");
      int childCategoryId = (Integer) testObjects.get("childCategoryId");
     
      MessageProcessor flow = lookupFlowConstruct("get-category-tree");
      MuleEvent response = flow.process(getTestEvent(testObjects));
     
      CatalogCategoryTree tree = (CatalogCategoryTree) response.getMessage().getPayload();
      assertTrue(tree.getCategory_id() == parentCategoryId);
     
      CatalogCategoryEntity[] children = tree.getChildren();
View Full Code Here

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

  public void testGetOrderShipment() {
    try {
      String shipmentId = (String) testObjects.get("shipmentId");
     
      MessageProcessor flow = lookupFlowConstruct("get-order-shipment");
      MuleEvent response = flow.process(getTestEvent(testObjects));
     
      SalesOrderShipmentEntity shipment = (SalesOrderShipmentEntity) response.getMessage().getPayload();
      assertTrue(shipment.getIncrement_id().equals(shipmentId));
    }
    catch (Exception e) {
View Full Code Here

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

  @Category({RegressionTests.class})
  @Test
  public void testUpdateProduct() {
    try {
      MessageProcessor flow = lookupFlowConstruct("update-product");
      MuleEvent response = flow.process(getTestEvent(testObjects));
     
      assertTrue("Assert that the update was successful", (Boolean) response.getMessage().getPayload());
    }
    catch (Exception e) {
      e.printStackTrace();
View Full Code Here

  @Before
  public void setUp() {
    try {
      testObjects = (HashMap<String, Object>) context.getBean("listStockItems");
      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 testListStockItems() {
    try {
      MessageProcessor flow = lookupFlowConstruct("list-stock-items");
     
      MuleEvent response = flow.process(getTestEvent(testObjects));
      List<CatalogInventoryStockItemEntity> result = (List<CatalogInventoryStockItemEntity>) response.getMessage().getPayload();
      assertNotNull(result);
    }
    catch (Exception e) {
      e.printStackTrace();
View Full Code Here

  @Category({RegressionTests.class})
  @Test
  public void testAddOrderComment() {
    try {
      MessageProcessor flow = lookupFlowConstruct("add-order-comment");
      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.