Class OrderPromotionWithProductRestrictionTest

  • All Implemented Interfaces:
    JaloSessionHolder

    public class OrderPromotionWithProductRestrictionTest
    extends AbstractPromotionServiceTest
    Tests whether order promotion should be applied with product restriction under different circumstances.
    • Constructor Detail

      • OrderPromotionWithProductRestrictionTest

        public OrderPromotionWithProductRestrictionTest()
    • Method Detail

      • testOrderPromotionWithoutRestriction

        public void testOrderPromotionWithoutRestriction()
                                                  throws CalculationException
        Creates an orderThresholdFreeGiftPromotion without product restriction, and the cart contains only product1 which is restricted. The free gift product should still be added to the cart.
        Throws:
        CalculationException
      • testOrderPromotionWithRestriction

        public void testOrderPromotionWithRestriction()
                                               throws CalculationException
        Creates an orderThresholdFreeGiftPromotion WITH product restriction, and the cart contains only product1 which is restricted. This time, the free gift product should NOT be added to the cart.
        Throws:
        CalculationException
      • testMoreProductsOrderPromotionWithoutRestriction

        public void testMoreProductsOrderPromotionWithoutRestriction()
                                                              throws CalculationException
        Creates an orderThresholdFreeGiftPromotion without product restriction, and the cart contains proudct2 which is not restricted. The free gift product should be added to the cart.
        Throws:
        CalculationException
      • testMoreProductsOrderPromotionWithRestriction

        public void testMoreProductsOrderPromotionWithRestriction()
                                                           throws CalculationException
        Creates an orderThresholdFreeGiftPromotion WITH product restriction, and the cart contains proudct2 which is not restricted, so the free gift product should be added to the cart.
        Throws:
        CalculationException