Class PromotionGroupTest

All Implemented Interfaces:
JaloSessionHolder

public class PromotionGroupTest extends AbstractPromotionTest
PromotionsTest. Test uses products from hwcatalog version online.
  • Constructor Details

    • PromotionGroupTest

      public PromotionGroupTest()
  • Method Details

    • setUp

      public void setUp() throws Exception
      Throws:
      Exception
    • testFirstPromotionGroup

      public void testFirstPromotionGroup() throws JaloPriceFactoryException
      Throws:
      JaloPriceFactoryException
    • testSecondPromotionGroup

      public void testSecondPromotionGroup() throws JaloPriceFactoryException
      Throws:
      JaloPriceFactoryException
    • testProductPercentageDiscountPromotion

      public void testProductPercentageDiscountPromotion()
      Tests ProductPercentageDiscountPromotion
    • testProductSteppedMultiBuyPromotion

      public void testProductSteppedMultiBuyPromotion()
      Tests ProductSteppedMultiBuyPromotion
    • testMixedPromotions

      public void testMixedPromotions()
      Tests mixed promotion scenario: ProductSteppedMultiBuyPromotion + ProductPercentageDiscountPromotion. ProductSteppedMultiBuyPromotion has higher priority, ProductPercentageDiscountPromotion has lower priority. There are 5 items in the cart. First 4 are covered by ProductSteppedMultiBuyPromotion, because the definition of this promotion contains entries for 3 and 4 products - the latter one is taken. The remaining one product is covered by ProductPercentageDiscountPromotion. In the effect total price is composed of two parts: first part is the price for first 4 items, second part is the price for the last item. The first price is determined by the ProductSteppedMultiBuyPromotion promotion's steps definition (it does not depend on product price!), second price is determined by the unit price of the item and the promotion's defined percentage discount.