Examples of ItemValue


Examples of xpetstore.domain.catalog.model.ItemValue

    //================================================   
    public void testGetItem(  )
    {
        try
        {
            ItemValue item = _petstore.getItem( "EST-1" );
            assertNotNull( "Item[EST-1] not found", item );
            assertEquals( "productId", "EST-1", item.getItemId(  ) );
            assertEquals( "name", "Large", item.getDescription(  ) );
            assertEquals( "listPrice", 16.50, item.getListPrice(  ), 0 );
            assertEquals( "unitCost", 10.00, item.getUnitCost(  ), 0 );
            assertEquals( "itemPath", "fish1.jpg", item.getImagePath(  ) );
        }
        catch ( Exception e )
        {
            fail( "Error=" + e.toString(  ) );
        }
View Full Code Here

Examples of xpetstore.domain.catalog.model.ItemValue

            for ( int i = 0; it.hasNext(  ); )
            {
                String         prefix = "order#" + i;
                OrderItemValue value = ( OrderItemValue ) it.next(  );
                ItemValue      item = value.getItem(  );

                assertNotNull( prefix + ".item", value.getItem(  ) );

                if ( "EST-1".equals( item.getItemId(  ) ) )
                {
                    assertEquals( prefix + ".quantity", 10, value.getQuantity(  ) );
                    assertEquals( prefix + ".unitPrice", 16.5, value.getUnitPrice(  ), 0 );
                }
                else if ( "EST-10".equals( item.getItemId(  ) ) )
                {
                    assertEquals( prefix + ".quantity", 1, value.getQuantity(  ) );
                    assertEquals( prefix + ".unitPrice", 28.5, value.getUnitPrice(  ), 0 );
                }
                else
                {
                    fail( prefix + ".id is invalid: " + item.getItemId(  ) );
                }
            }
        }
        catch ( Exception e )
        {
View Full Code Here

Examples of xpetstore.domain.catalog.model.ItemValue

                String  key = ( String ) it.next(  );
                Integer value = ( Integer ) _details.get( key );
                try
                {
                    ItemLocal    ilocal = ihome.findByPrimaryKey( key );
                    ItemValue    item = ilocal.getItemValue(  );
                    ProductValue prod = ilocal.getProduct(  ).getProductValue(  );

                    CartItem     ci = new CartItem( item.getItemId(  ), prod.getProductId(  ), prod.getName(  ), item.getDescription(  ), value.intValue(  ), item.getListPrice(  ) );

                    items.add( ci );
                }
                catch ( Exception cce )
                {
View Full Code Here

Examples of xpetstore.domain.catalog.model.ItemValue

        ItemForm      frm = ( ItemForm ) form;
        String        itemId = frm.getItemId(  );
        PetstoreLocal petstore = getPetstore(  );

        /* Item */
        ItemValue item = petstore.getItem( itemId );
        frm.setItemValue( item );

        /* Product */
        ProductValue product = petstore.getProductByItem( itemId );
        frm.setProductValue( product );
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.