Class DefaultConsignmentAmountCalculationStrategyTest
- java.lang.Object
-
- de.hybris.platform.warehousing.consignment.strategies.impl.DefaultConsignmentAmountCalculationStrategyTest
-
@UnitTest public class DefaultConsignmentAmountCalculationStrategyTest extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description protected static java.math.BigDecimalAMOUNT1protected static java.math.BigDecimalAMOUNT2protected static java.lang.StringCODE1protected static java.lang.StringCODE2protected static java.math.BigDecimalDELIVERY_COSTprotected static java.math.BigDecimalDELIVERY_COST_TAXprotected static java.math.BigDecimalDISCOUNTSprotected static java.math.BigDecimalPRODUCT_LEVEL_DISCOUNTprotected static java.math.BigDecimalTAX1protected static java.math.BigDecimalTAX2protected static java.math.BigDecimalTOTAL_DISCOUNTprotected static java.math.BigDecimalTOTAL_TAX
-
Constructor Summary
Constructors Constructor Description DefaultConsignmentAmountCalculationStrategyTest()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcalculateAmountFirstConsignmentCapturedFirst()voidcalculateAmountForProductWithNoTaxValue()voidcalculateAmountGreaterThanAlreadyCaptured()voidcalculateAmountSecondConsignmentCapturedFirst()protected voidcalculateAndAssertDiscountAmountForConsignment(ConsignmentModel consignmentModel)Calculates discount amount for a givenConsignmentModelthen asserts the calculated amountvoidcalculateLeftOverOnLastConsignment()voidcalculateOrderWithOnlyOneConsignment()voidcleanUp()voidsetUp()voidshouldCalculateConsignmentEntryWithoutTax()voidshouldCalculateConsignmentEntryWithTax()voidshouldCalculateDiscountForIndividualConsignments()voidshouldCalculateDiscountForTheLastConsignment()voidshouldReturnZeroIfNoQtyLeftInCalculateConsignmentEntryAmount()
-
-
-
Field Detail
-
CODE1
protected static final java.lang.String CODE1
- See Also:
- Constant Field Values
-
CODE2
protected static final java.lang.String CODE2
- See Also:
- Constant Field Values
-
AMOUNT1
protected static final java.math.BigDecimal AMOUNT1
-
AMOUNT2
protected static final java.math.BigDecimal AMOUNT2
-
DELIVERY_COST
protected static final java.math.BigDecimal DELIVERY_COST
-
DISCOUNTS
protected static final java.math.BigDecimal DISCOUNTS
-
TAX1
protected static final java.math.BigDecimal TAX1
-
TAX2
protected static final java.math.BigDecimal TAX2
-
DELIVERY_COST_TAX
protected static final java.math.BigDecimal DELIVERY_COST_TAX
-
TOTAL_TAX
protected static final java.math.BigDecimal TOTAL_TAX
-
TOTAL_DISCOUNT
protected static final java.math.BigDecimal TOTAL_DISCOUNT
-
PRODUCT_LEVEL_DISCOUNT
protected static final java.math.BigDecimal PRODUCT_LEVEL_DISCOUNT
-
-
Method Detail
-
setUp
public void setUp()
-
cleanUp
public void cleanUp()
-
calculateAmountFirstConsignmentCapturedFirst
public void calculateAmountFirstConsignmentCapturedFirst()
-
calculateAmountSecondConsignmentCapturedFirst
public void calculateAmountSecondConsignmentCapturedFirst()
-
calculateLeftOverOnLastConsignment
public void calculateLeftOverOnLastConsignment()
-
calculateOrderWithOnlyOneConsignment
public void calculateOrderWithOnlyOneConsignment()
-
calculateAmountGreaterThanAlreadyCaptured
public void calculateAmountGreaterThanAlreadyCaptured()
-
calculateAmountForProductWithNoTaxValue
public void calculateAmountForProductWithNoTaxValue()
-
shouldCalculateDiscountForIndividualConsignments
public void shouldCalculateDiscountForIndividualConsignments()
-
shouldCalculateDiscountForTheLastConsignment
public void shouldCalculateDiscountForTheLastConsignment()
-
shouldCalculateConsignmentEntryWithTax
public void shouldCalculateConsignmentEntryWithTax()
-
shouldCalculateConsignmentEntryWithoutTax
public void shouldCalculateConsignmentEntryWithoutTax()
-
shouldReturnZeroIfNoQtyLeftInCalculateConsignmentEntryAmount
public void shouldReturnZeroIfNoQtyLeftInCalculateConsignmentEntryAmount()
-
calculateAndAssertDiscountAmountForConsignment
protected void calculateAndAssertDiscountAmountForConsignment(ConsignmentModel consignmentModel)
Calculates discount amount for a givenConsignmentModelthen asserts the calculated amount- Parameters:
consignmentModel-ConsignmentModelto calculate and assert the discount
-
-