Examples of AssociativeEntity


Examples of com.magento.api.AssociativeEntity

     * @param variable the first operand
     * @param value the second operand
     */
    public void addBinaryExpression(String operation, String variable, String value)
    {
        complexFilters.add(new ComplexFilter(variable, new AssociativeEntity(operation, convertValue(value))));
    }
View Full Code Here

Examples of com.magento.api.AssociativeEntity

                Map<String, String> map = (Map<String, String>) value;
                AssociativeEntity[] array = new AssociativeEntity[map.size()];
                int i = 0;
                for (Entry<String, String> entry : map.entrySet())
                {
                        array[i++] = new AssociativeEntity(entry.getKey(), entry.getValue());
                }
                return array;
            }
            catch (Exception e)
            {
View Full Code Here

Examples of com.magento.api.AssociativeEntity

    @Test
    public void testSalesOrdersList() throws Exception
    {
        when(port.salesOrderList(anyString(), //
            eq(new Filters(null, new ComplexFilter[]{//
                new ComplexFilter("customer_id", new AssociativeEntity("eq", "500"))})))) //
        .thenReturn(new SalesOrderListEntity[]{new SalesOrderListEntity()});
        assertEquals(1, connector.listOrders("eq(customer_id, 500)").size());
    }
View Full Code Here

Examples of com.magento.api.AssociativeEntity

    @Test
    public void testSalesOrderShipmentGetCarriers() throws RemoteException
    {
        when(port.salesOrderShipmentGetCarriers(anyString(), eq(ORDER_ID))) //
        .thenReturn(new AssociativeEntity[]{new AssociativeEntity("FDX", "Fedex Express")});
        assertEquals(Collections.singletonList(new Carrier("FDX", "Fedex Express")),
            connector.getOrderShipmentCarriers(ORDER_ID));
    }
View Full Code Here

Examples of com.magento.api.AssociativeEntity

     */
    @Test
    public void testFilterCreationWithBinary() throws Exception
    {
        assertEquals(parse("eq(customer_name, 900)"), new Filters(null,
            new ComplexFilter[]{new ComplexFilter("customer_name", new AssociativeEntity("eq", "900"))}));
    }
View Full Code Here

Examples of com.magento.api.AssociativeEntity

     */
    @Test
    public void testFilterCreationWithUnary() throws Exception
    {
        assertEquals(parse("notnull(customer_name)"), new Filters(null,
            new ComplexFilter[]{new ComplexFilter("customer_name", new AssociativeEntity("notnull", ""))}));
    }
View Full Code Here

Examples of com.magento.api.AssociativeEntity

    @Test
    public void testFilterCreationWithAnd() throws Exception
    {
        assertEquals(parse("notnull(customer_name), lt(customer_city_code, 56)"), //
            new Filters(null, new ComplexFilter[]{
                new ComplexFilter("customer_name", new AssociativeEntity("notnull", "")),
                new ComplexFilter("customer_city_code", new AssociativeEntity("lt", "56"))}));
    }
View Full Code Here

Examples of com.magento.api.AssociativeEntity

     * Tests that the apos of a string argument are not added to the filtering value
     */
    @Test
    public void testParseStringArgument() throws Exception
    {
        assertEquals(new Filters(null, new ComplexFilter[]{new ComplexFilter("name", new AssociativeEntity(
            "eq", "Hardware"))}), parse("eq(name, 'Hardware')"));
        assertEquals(new Filters(null, new ComplexFilter[]{new ComplexFilter("name", new AssociativeEntity(
            "eq", ""))}), parse("eq(name, '')"));
    }
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.