Class PricingHandlerImplTest
- java.lang.Object
-
- de.hybris.platform.sap.productconfig.runtime.cps.pricing.impl.PricingHandlerImplTest
-
@UnitTest public class PricingHandlerImplTest extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description PricingHandlerImplTest()
-
Method Summary
-
-
-
Method Detail
-
setup
public void setup() throws PricingEngineException- Throws:
PricingEngineException
-
createPriceModel
protected CPSValuePrice createPriceModel(double valuePrice)
-
createPriceKey
protected CPSMasterDataVariantPriceKey createPriceKey(java.lang.String productId, java.lang.String pricingKey)
-
testRetrieveVariantConditions
public void testRetrieveVariantConditions() throws PricingEngineException- Throws:
PricingEngineException
-
testGetPricesMap
public void testGetPricesMap() throws PricingEngineException- Throws:
PricingEngineException
-
testGetValuePrice
public void testGetValuePrice() throws PricingEngineException- Throws:
PricingEngineException
-
testGetValuePrice_pricingKeyNull
public void testGetValuePrice_pricingKeyNull() throws PricingEngineException- Throws:
PricingEngineException
-
testIsValueSelectedWithNullListOfValuesReturnsFalse
public void testIsValueSelectedWithNullListOfValuesReturnsFalse()
-
testIsValueSelectedWithEmptyListOfValuesReturnsFalse
public void testIsValueSelectedWithEmptyListOfValuesReturnsFalse()
-
testIsValueSelectedWithListOfValuesReturnsFalse
public void testIsValueSelectedWithListOfValuesReturnsFalse()
-
testIsValueSelectedWithListOfNullValueReturnsFalse
public void testIsValueSelectedWithListOfNullValueReturnsFalse()
-
testIsValueSelectedWithListOfWrongValuesReturnsFalse
public void testIsValueSelectedWithListOfWrongValuesReturnsFalse()
-
testIsValueSelectedWithListOfValuesReturnsTrue
public void testIsValueSelectedWithListOfValuesReturnsTrue()
-
testHandleSelectedValuePriceForSingleValueReturnNull
public void testHandleSelectedValuePriceForSingleValueReturnNull()
-
testHandleSelectedValuePriceForSingleValueReturnPrice
public void testHandleSelectedValuePriceForSingleValueReturnPrice()
-
testHandleSelectedValuePriceForMultiValueReturnNull
public void testHandleSelectedValuePriceForMultiValueReturnNull()
-
testHandleSelectedValuePriceFor_SingleValue_selectedValuePriceAlreadySet
public void testHandleSelectedValuePriceFor_SingleValue_selectedValuePriceAlreadySet()
-
testCalculateDeltaPriceWithSavings
public void testCalculateDeltaPriceWithSavings()
-
testCalculateSavings
public void testCalculateSavings()
-
testCalculateDeltaPriceWithSelectedValuePriceSet_300
public void testCalculateDeltaPriceWithSelectedValuePriceSet_300()
-
testCalculateDeltaPriceWithSelectedValuePriceSet_100
public void testCalculateDeltaPriceWithSelectedValuePriceSet_100()
-
fillPossibleValues
protected java.util.Set<java.lang.String> fillPossibleValues()
-
testCalculateDeltaPriceWithSelectedValuePriceNull
public void testCalculateDeltaPriceWithSelectedValuePriceNull()
-
testCalculateDeltaPriceWith_valuePriceNull
public void testCalculateDeltaPriceWith_valuePriceNull()
-
createValuePriceInfo
protected CPSValuePriceInfo createValuePriceInfo(java.math.BigDecimal price)
-
createValuePriceInfo
protected CPSValuePriceInfo createValuePriceInfo(java.math.BigDecimal price, java.math.BigDecimal obsoletePrice)
-
createValuePriceInfoWithDelta
protected CPSValuePriceInfo createValuePriceInfoWithDelta(java.math.BigDecimal price, java.math.BigDecimal delta)
-
createPossibleValue
protected CsticValueModel createPossibleValue(java.lang.String possibleValueId)
-
testCreatePriceModelFromCPSValue
public void testCreatePriceModelFromCPSValue()
-
testCreatePriceModelNull
public void testCreatePriceModelNull()
-
testGetSelectedValuePriceAndValuePricesMap
public void testGetSelectedValuePriceAndValuePricesMap() throws PricingEngineException- Throws:
PricingEngineException
-
testGetSelectedValuePriceAndValuePricesMapKeyNotKnown
public void testGetSelectedValuePriceAndValuePricesMapKeyNotKnown() throws PricingEngineException- Throws:
PricingEngineException
-
testGetSelectedValuePriceAndValuePricesMap_onlySomeValuesHavePrices
public void testGetSelectedValuePriceAndValuePricesMap_onlySomeValuesHavePrices() throws PricingEngineException- Throws:
PricingEngineException
-
testGetSelectedValuePriceAndValuePricesMap_NoValuePrices
public void testGetSelectedValuePriceAndValuePricesMap_NoValuePrices() throws PricingEngineException- Throws:
PricingEngineException
-
testGetSelectedValuePriceAndValuePricesMap_checkMap
public void testGetSelectedValuePriceAndValuePricesMap_checkMap() throws PricingEngineException- Throws:
PricingEngineException
-
testGetConfigModelFactoryNotNull
public void testGetConfigModelFactoryNotNull()
-
testCreatePriceModel
public void testCreatePriceModel()
-
testFillValuePrices
public void testFillValuePrices() throws PricingEngineException- Throws:
PricingEngineException
-
testFillValueAndDeltaPricesCsticNull
public void testFillValueAndDeltaPricesCsticNull() throws PricingEngineException- Throws:
PricingEngineException
-
testGetValuePrices
public void testGetValuePrices() throws PricingEngineException- Throws:
PricingEngineException
-
testFillPriceInfos_ShowDelta
public void testFillPriceInfos_ShowDelta()
-
testFillPriceInfos_ShowAbsolute
public void testFillPriceInfos_ShowAbsolute()
-
testFillPriceInfosPriceNull
public void testFillPriceInfosPriceNull()
-
testFillPriceInfosNotFound
public void testFillPriceInfosNotFound()
-
testCreateUpdateModel
public void testCreateUpdateModel()
-
createCsticModel
protected CsticModel createCsticModel(java.lang.String cstic, java.lang.String value1, java.lang.String value2, java.lang.String value3)
-
testFillValuePricesFromContext
public void testFillValuePricesFromContext() throws PricingEngineException- Throws:
PricingEngineException
-
testFillValuePriceInfos
public void testFillValuePriceInfos()
-
testFillValuePriceInfo_ignoreZeroPrices
public void testFillValuePriceInfo_ignoreZeroPrices()
-
testAddValueToValuePriceInfoMap
public void testAddValueToValuePriceInfoMap() throws PricingEngineException- Throws:
PricingEngineException
-
testAddValueToValuePriceInfoMap_zeroPrice
public void testAddValueToValuePriceInfoMap_zeroPrice() throws PricingEngineException- Throws:
PricingEngineException
-
testIsValuePriceZero
public void testIsValuePriceZero()
-
testDetermineInstanceType
public void testDetermineInstanceType()
-
testDetermineInstanceTypeClass
public void testDetermineInstanceTypeClass()
-
testDetermineInstanceTypeNotFound
public void testDetermineInstanceTypeNotFound()
-
testDetermineInstanceTypeUnambigous
public void testDetermineInstanceTypeUnambigous()
-
testFillValuePricesUnknown
public void testFillValuePricesUnknown() throws PricingEngineException- Throws:
PricingEngineException
-
testApplyDiscountNullDiscount
public void testApplyDiscountNullDiscount()
-
testApplyDiscountNullCPSValuePrice
public void testApplyDiscountNullCPSValuePrice()
-
testAdjustCPSValuePrice
public void testAdjustCPSValuePrice()
-
testAdjustCPSValuePriceWithRounding
public void testAdjustCPSValuePriceWithRounding()
-
testAdjustCPSValuePriceWithRoundingZeroDigitCurrency
public void testAdjustCPSValuePriceWithRoundingZeroDigitCurrency()
-
testFindDiscountNull
public void testFindDiscountNull()
-
testFindDiscountNullForNullDiscount
public void testFindDiscountNullForNullDiscount()
-
testFindDiscount
public void testFindDiscount()
-
testFindDiscountValueNotMatching
public void testFindDiscountValueNotMatching()
-
testFindDiscountCsticNotMatching
public void testFindDiscountCsticNotMatching()
-
testGetBasePrice
public void testGetBasePrice()
-
testGetSelectedOptionsPrice
public void testGetSelectedOptionsPrice()
-
testGetSelectedOptionsPriceNoResult
public void testGetSelectedOptionsPriceNoResult()
-
testGetSelectedOptionsPriceNoTargetForSelectedOptions
public void testGetSelectedOptionsPriceNoTargetForSelectedOptions()
-
testGetSelectedOptionsPriceNoSelectedOptionsPresent
public void testGetSelectedOptionsPriceNoSelectedOptionsPresent()
-
testGetCurrentTotalPrice
public void testGetCurrentTotalPrice()
-
testGetCurrentTotalPriceNoPriceDocument
public void testGetCurrentTotalPriceNoPriceDocument()
-
testGetCurrentTotalSavings
public void testGetCurrentTotalSavings()
-
testGetCurrentTotalSavingsNoOriginalPrice
public void testGetCurrentTotalSavingsNoOriginalPrice()
-
testGetPriceSummary
public void testGetPriceSummary() throws PricingEngineException, ConfigurationEngineException
-
testGetPriceSummaryNoDiscounts
public void testGetPriceSummaryNoDiscounts() throws PricingEngineException, ConfigurationEngineException
-
testGetPriceSummaryNoConfiguration
public void testGetPriceSummaryNoConfiguration() throws PricingEngineException, ConfigurationEngineException
-
testGetPricesMapNotInCache
public void testGetPricesMapNotInCache() throws PricingEngineException- Throws:
PricingEngineException
-
-