Class Order2PromotionResultRelationTest

All Implemented Interfaces:
JaloSessionHolder

@IntegrationTest public class Order2PromotionResultRelationTest extends AbstractPromotionServiceTest
Tests the relation between AbstractOrderModel and PromotionResultModel.
  • Constructor Details

    • Order2PromotionResultRelationTest

      public Order2PromotionResultRelationTest()
  • Method Details

    • setUp

      public void setUp() throws Exception
      Overrides:
      setUp in class AbstractPromotionServiceTest
      Throws:
      Exception
    • testOrderPromotionResultRelationTest

      public void testOrderPromotionResultRelationTest() throws CalculationException
      Tests the relation between AbstractOrderModel and PromotionResultModel, and between PromotionResultModel and AbstractPromotionActionModel. See PRO-66 for more details. If promotionsCachingStrategy bean is activated then instead getting promotionResults from db, data is obtained from cache.
      • adds a product to cart, adds a product promotion, and update promotions for the cart,
      • tests both table sizes before and after the updatePromotion method call,
      • adds an order promotion, and update promotion for the cart again,
      • tests both table sizes again,
      • creates an order from cart without updatePromotion method call, and tests both table sizes,
      • removes the cart, and tests both table sizes,
      • updates promotion for the order, and tests its table size,
      • removes the order, and tests both table sizes.
      Throws:
      CalculationException