Class DefaultCommerceCartCalculationStrategyIntegrationTest

All Implemented Interfaces:
JaloSessionHolder

@IntegrationTest public class DefaultCommerceCartCalculationStrategyIntegrationTest extends ServicelayerTest
Integration test suite(product discount and delivery cost threshold settings ) for DefaultCommerceCartCalculationStrategy
  • Constructor Details

    • DefaultCommerceCartCalculationStrategyIntegrationTest

      public DefaultCommerceCartCalculationStrategyIntegrationTest()
  • Method Details

    • setUp

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

      public void reset() throws Exception
      Throws:
      Exception
    • shouldNotChangeOrderFeesWhenCallCalculateCartAgain

      public void shouldNotChangeOrderFeesWhenCallCalculateCartAgain() throws CalculationException
      Throws:
      CalculationException
    • shouldGetNoReSetOrderFeesWhenCallCalculateCartAgainAfterReAddToCart

      public void shouldGetNoReSetOrderFeesWhenCallCalculateCartAgainAfterReAddToCart() throws CalculationException
      Throws:
      CalculationException
    • shouldGetReSetOrderFeesWhenCallCalculateCartAgainWithEnableReSetDeliveryCostAfterReAddToCart

      public void shouldGetReSetOrderFeesWhenCallCalculateCartAgainWithEnableReSetDeliveryCostAfterReAddToCart() throws CalculationException
      Throws:
      CalculationException
    • shouldGetNoReSetOrderFeesWhenCallRecalculateCartInOccPlaceOrderApiWithOutEnableReSetDeliveryCost

      public void shouldGetNoReSetOrderFeesWhenCallRecalculateCartInOccPlaceOrderApiWithOutEnableReSetDeliveryCost() throws CalculationException
      Throws:
      CalculationException
    • shouldGetReSetOrderFeesWhenCallRecalculateCartInOccPlaceOrderApiWithEnableReSetDeliveryCost

      public void shouldGetReSetOrderFeesWhenCallRecalculateCartInOccPlaceOrderApiWithEnableReSetDeliveryCost() throws CalculationException
      Throws:
      CalculationException
    • reAddProductToCartWithDeliveryModeInCart

      protected void reAddProductToCartWithDeliveryModeInCart(CartModel cartModel)
      here simulate the process of re-add products to Cart with already setting delivery mode in cart, by adjust the order entry quantity with the entry's initial quantity, resetting entry's quantity with same quantity can trigger cartModel.setCalculated(false). or we can just cartModel.setCalculated(false) directly. for order entry,setCalulacted(false) + modelService.save(entry) can not trigger cartModel.setCalculated(false)
      Parameters:
      cartModel -
    • prepareAndCalculateCartWithDeliveryCostWorking

      protected void prepareAndCalculateCartWithDeliveryCostWorking()
      the OriginalCart was loaded from test impex data, the cart has already contained 2 products and every product has its' price, tax. and also simulate the process of addToCart and checkout