Class GroupOrderEntryPopulatorTest
- java.lang.Object
-
- de.hybris.platform.commercefacades.order.converters.populator.GroupOrderEntryPopulatorTest
-
- Direct Known Subclasses:
GroupOrderConsignmentEntryPopulatorTest
@UnitTest public class GroupOrderEntryPopulatorTest extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringBASE_PRODUCT_2_PRICE_RANGE_TESTstatic java.math.BigDecimalMAX_PRICE_RANGE_TESTstatic java.math.BigDecimalMIN_PRICE_RANGE_TESTprotected GroupOrderEntryPopulatorpopulatorstatic java.math.BigDecimalTOTAL_PRICE_RANGE_TEST
-
Constructor Summary
Constructors Constructor Description GroupOrderEntryPopulatorTest()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected EntryGroupDatacreateEntryGroupData(OrderEntryData entry, int number)OrderEntryDatacreateOrderEntry(java.lang.String productCode, java.lang.String baseProductCode, java.math.BigDecimal price, java.math.BigDecimal totalPrice)voidsetUp()voidshouldGroupEntries()voidshouldGroupEntriesWithEntryGroups()Given:entry1(multid=true,baseProduct=A,group=standalone,children=[]) entry2(multid=true,baseProduct=A,group=standalone,children=[]) entry3(multid=true,baseProduct=B,group=standalone,children=[])Result:entry4(fake=true,baseProduct=A,group=standalone,children=[entry1(group=null),entry2(group=null)]) entry5(fake=true,baseProduct=B,group=standalone,children=[entry3(group=null)])protected voidvalidatePriceRange(OrderEntryData parentEntry)protected voidvalidateProductInfo(OrderEntryData parentEntry, OrderEntryData firstEntry)
-
-
-
Field Detail
-
MIN_PRICE_RANGE_TEST
public static final java.math.BigDecimal MIN_PRICE_RANGE_TEST
-
MAX_PRICE_RANGE_TEST
public static final java.math.BigDecimal MAX_PRICE_RANGE_TEST
-
BASE_PRODUCT_2_PRICE_RANGE_TEST
public static final java.lang.String BASE_PRODUCT_2_PRICE_RANGE_TEST
- See Also:
- Constant Field Values
-
TOTAL_PRICE_RANGE_TEST
public static final java.math.BigDecimal TOTAL_PRICE_RANGE_TEST
-
populator
@InjectMocks protected GroupOrderEntryPopulator populator
-
-
Method Detail
-
setUp
public void setUp()
-
shouldGroupEntries
public void shouldGroupEntries()
-
shouldGroupEntriesWithEntryGroups
public void shouldGroupEntriesWithEntryGroups()
Given:entry1(multid=true,baseProduct=A,group=standalone,children=[]) entry2(multid=true,baseProduct=A,group=standalone,children=[]) entry3(multid=true,baseProduct=B,group=standalone,children=[])Result:entry4(fake=true,baseProduct=A,group=standalone,children=[entry1(group=null),entry2(group=null)]) entry5(fake=true,baseProduct=B,group=standalone,children=[entry3(group=null)])
-
validateProductInfo
protected void validateProductInfo(OrderEntryData parentEntry, OrderEntryData firstEntry)
-
validatePriceRange
protected void validatePriceRange(OrderEntryData parentEntry)
-
createOrderEntry
public OrderEntryData createOrderEntry(java.lang.String productCode, java.lang.String baseProductCode, java.math.BigDecimal price, java.math.BigDecimal totalPrice)
-
createEntryGroupData
protected EntryGroupData createEntryGroupData(OrderEntryData entry, int number)
-
-