Examples of CatalogProductReturnEntity


Examples of com.magento.api.CatalogProductReturnEntity

     * This test assumes that there exists a product with id {@link #EXISTENT_PRODUCT_ID}
     */
    @Test @Ignore("Broken since Magento 1.5.1.0")
    public void getExistentProductBySku() throws Exception
    {
        CatalogProductReturnEntity product = getExistentProductWithDescriptions();
        CatalogProductReturnEntity product2 = connector.getProduct(null, (String) product.getSku(), null, null,
                Arrays.asList("description"), Collections.<String>emptyList());
        assertEquals(product.getProduct_id(), product2.getProduct_id());
    }
View Full Code Here

Examples of com.magento.api.CatalogProductReturnEntity

     * This test assumes that there exists a product with id {@link #EXISTENT_PRODUCT_ID}
     */
    @Test
    public void getExistentProductByIdOrSku() throws Exception
    {
        CatalogProductReturnEntity product = getExistentProductWithDescriptions();
        CatalogProductReturnEntity product2 = connector.getProduct(null, null, (String) product.getSku(), null,
                Arrays.asList("description"), Collections.<String>emptyList());
        assertEquals(product.getProduct_id(), product2.getProduct_id());
    }
View Full Code Here

Examples of com.magento.api.CatalogProductReturnEntity

    public void getAndUpdateExistentProduct() throws Exception
    {
        final String description = "A great wood kitchen table";
        final String shortDescription = "Best Product ever!";
        updateDescriptions(description, shortDescription);
        CatalogProductReturnEntity product = getExistentProductWithDescriptions();
        assertEquals(description, product.getDescription());
        assertEquals(shortDescription, product.getDescription());
       
        final Object description2 = "An acceptable kitchen table";
        final Object shortDescription2 = "A good product";
        updateDescriptions(description2, shortDescription2);
        product = getExistentProductWithDescriptions();
        assertEquals(description2, product.getDescription());
        assertEquals(shortDescription2, product.getDescription());
    }
View Full Code Here

Examples of com.magento.api.CatalogProductReturnEntity

        {
            int originalProductsCount = connector.listProducts(null, null).size();
            productId = connector.createProduct("simple", 4, "AK4596", null, null, null);
            assertEquals(originalProductsCount + 1, connector.listProducts(null, null).size());
            connector.updateProductSpecialPrice(null, null, productId.toString(), "6953.6", "2011-30-01", null, null);
            CatalogProductReturnEntity productSpecialPrice = connector.getProductSpecialPrice(productId, null, null,
                    null);
            assertNotNull(productSpecialPrice);
            System.out.printf("Special price:%s%n", productSpecialPrice);
        }
        finally
View Full Code Here

Examples of com.magento.api.CatalogProductReturnEntity

  public void testGetProduct() {
    try {
      MessageProcessor flow = lookupFlowConstruct("get-product");
     
      MuleEvent response = flow.process(getTestEvent(testObjects));
      CatalogProductReturnEntity catalogProductReturnEntity = (CatalogProductReturnEntity) response.getMessage().getPayload();
     
      assertEquals("The sku of the retrieved object should be " + testObjects.get("sku"), testObjects.get("sku"), catalogProductReturnEntity.getSku());
    }
    catch (Exception e) {
      e.printStackTrace();
      fail();
    }
View Full Code Here

Examples of com.magento.api.CatalogProductReturnEntity

      int productId = (Integer) testObjects.get("productId");
     
      MessageProcessor flow = lookupFlowConstruct("get-product-special-price");
      MuleEvent response = flow.process(getTestEvent(testObjects));
     
      CatalogProductReturnEntity specialPriceResult = (CatalogProductReturnEntity) response.getMessage().getPayload();
      assertTrue(productId == Integer.parseInt(specialPriceResult.getProduct_id()));
      assertNotNull(specialPriceResult.getSpecial_price());
      assertTrue(specialPriceResult.getSpecial_price().equals(specialPrice));
    }
    catch (Exception e) {
      e.printStackTrace();
      fail();
    }
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.