Class DefaultPromotionEngineServiceTest

    • Constructor Detail

      • DefaultPromotionEngineServiceTest

        public DefaultPromotionEngineServiceTest()
    • Method Detail

      • testEvaluation

        public void testEvaluation()
                            throws java.io.IOException
        Throws:
        java.io.IOException
      • testEvaluationWithActualDate

        public void testEvaluationWithActualDate()
                                          throws java.io.IOException
        Throws:
        java.io.IOException
      • testEvaluationWithNotActualDate

        public void testEvaluationWithNotActualDate()
                                             throws java.io.IOException
        Throws:
        java.io.IOException
      • testTransferCartToOrderUpdateRule

        public void testTransferCartToOrderUpdateRule()
                                               throws java.io.IOException
        Throws:
        java.io.IOException
      • testTransferCartWithPromotionsForEntries

        public void testTransferCartWithPromotionsForEntries()
                                                      throws java.io.IOException
        Throws:
        java.io.IOException
      • testTransferCartToOrderTheSameRule

        public void testTransferCartToOrderTheSameRule()
                                                throws java.io.IOException
        Throws:
        java.io.IOException
      • testMultiplePromotionGroups

        public void testMultiplePromotionGroups()
                                         throws java.io.IOException
        Throws:
        java.io.IOException
      • testNoCatalogVersionPromotionFromSession

        public void testNoCatalogVersionPromotionFromSession()
                                                      throws java.io.IOException
        Throws:
        java.io.IOException
      • testEmptyCartRuleEngineContextIsUnique

        public void testEmptyCartRuleEngineContextIsUnique()
                                                    throws java.io.IOException
        Throws:
        java.io.IOException
      • testEmptyCartRuleEngineContextIsNotUnique

        public void testEmptyCartRuleEngineContextIsNotUnique()
                                                       throws java.io.IOException
        Throws:
        java.io.IOException
      • getRuleForFile

        protected AbstractRuleEngineRuleModel getRuleForFile​(java.lang.String fileName,
                                                             java.lang.String path)
                                                      throws java.io.IOException
        Creates a (non-persisted) AbstractRuleEngineRuleModel based on the given file and path. Note that this implementation assumes that the fileName matches the rule's name (excluding the .drl extension).
        Parameters:
        fileName -
        path -
        Returns:
        new AbstractRuleEngineRuleModel
        Throws:
        java.io.IOException
      • buildCartForUserWithCodeProductAndCurrency

        protected CartModel buildCartForUserWithCodeProductAndCurrency​(java.lang.String code,
                                                                       java.lang.String productCode,
                                                                       int items)
      • buildCartForUserWithCodeAndCurrency

        protected CartModel buildCartForUserWithCodeAndCurrency​(java.lang.String code,
                                                                java.lang.String productCode)
      • buildCartWithCodeAndCurrency

        protected CartModel buildCartWithCodeAndCurrency​(java.lang.String code)
      • buildCartWithCodeProductAndCurrency

        protected CartModel buildCartWithCodeProductAndCurrency​(java.lang.String code,
                                                                java.lang.String productCode,
                                                                int items)
      • getPromoGroup

        protected java.util.List<PromotionGroupModel> getPromoGroup​(java.lang.String code)
      • getModelService

        protected ModelService getModelService()
      • getCommerceRuleEngineService

        protected RuleEngineService getCommerceRuleEngineService()
      • getMediaService

        protected MediaService getMediaService()