Package com.magento.api

Examples of com.magento.api.CatalogCategoryTree


      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();
      CatalogCategoryEntity child = children[0]; // We only created 1 child.
     
      assertTrue(child.getCategory_id() == childCategoryId);
      assertTrue(child.getParent_id() == parentCategoryId);
    }
View Full Code Here


     * </pre>
     */
    @Test
    public void getCategoryTree() throws Exception
    {
        CatalogCategoryTree categoryTree = connector.getCategoryTree(String.valueOf(ROOT_CATEGORY_ID), null);
        assertEquals(ROOT_CATEGORY_ID, categoryTree.getCategory_id());
        assertEquals(CATEGORY_ID_1, categoryTree.getChildren()[0].getCategory_id());
        assertEquals(CATEGORY_ID_3, categoryTree.getChildren()[1].getCategory_id());
        assertEquals(CATEGORY_ID_2, categoryTree.getChildren()[2].getCategory_id());
    }
View Full Code Here

TOP

Related Classes of com.magento.api.CatalogCategoryTree

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.