Search in sources :

Example 1 with OrderItemImpl

use of org.broadleafcommerce.core.order.domain.OrderItemImpl in project BroadleafCommerce by BroadleafCommerce.

the class OrderItemDataProvider method provideBasicDiscreteSalesOrderItem.

@DataProvider(name = "basicDiscreteOrderItem")
public static Object[][] provideBasicDiscreteSalesOrderItem() {
    OrderItemImpl soi = new DiscreteOrderItemImpl();
    soi.setRetailPrice(new Money(BigDecimal.valueOf(10.25)));
    soi.setQuantity(3);
    return new Object[][] { { soi } };
}
Also used : Money(org.broadleafcommerce.common.money.Money) DiscreteOrderItemImpl(org.broadleafcommerce.core.order.domain.DiscreteOrderItemImpl) OrderItemImpl(org.broadleafcommerce.core.order.domain.OrderItemImpl) DiscreteOrderItemImpl(org.broadleafcommerce.core.order.domain.DiscreteOrderItemImpl) GiftWrapOrderItemImpl(org.broadleafcommerce.core.order.domain.GiftWrapOrderItemImpl) DataProvider(org.testng.annotations.DataProvider)

Example 2 with OrderItemImpl

use of org.broadleafcommerce.core.order.domain.OrderItemImpl in project BroadleafCommerce by BroadleafCommerce.

the class OrderItemDataProvider method provideBasicGiftWrapSalesOrderItem.

@DataProvider(name = "basicGiftWrapOrderItem")
public static Object[][] provideBasicGiftWrapSalesOrderItem() {
    OrderItemImpl soi = new GiftWrapOrderItemImpl();
    soi.setRetailPrice(new Money(BigDecimal.valueOf(1.25)));
    soi.setQuantity(1);
    return new Object[][] { { soi } };
}
Also used : Money(org.broadleafcommerce.common.money.Money) OrderItemImpl(org.broadleafcommerce.core.order.domain.OrderItemImpl) DiscreteOrderItemImpl(org.broadleafcommerce.core.order.domain.DiscreteOrderItemImpl) GiftWrapOrderItemImpl(org.broadleafcommerce.core.order.domain.GiftWrapOrderItemImpl) GiftWrapOrderItemImpl(org.broadleafcommerce.core.order.domain.GiftWrapOrderItemImpl) DataProvider(org.testng.annotations.DataProvider)

Aggregations

Money (org.broadleafcommerce.common.money.Money)2 DiscreteOrderItemImpl (org.broadleafcommerce.core.order.domain.DiscreteOrderItemImpl)2 GiftWrapOrderItemImpl (org.broadleafcommerce.core.order.domain.GiftWrapOrderItemImpl)2 OrderItemImpl (org.broadleafcommerce.core.order.domain.OrderItemImpl)2 DataProvider (org.testng.annotations.DataProvider)2