Class VoucherRestrictionServiceTest

All Implemented Interfaces:
JaloSessionHolder

@IntegrationTest public class VoucherRestrictionServiceTest extends AbstractVoucherServiceTest
  • Constructor Details

    • VoucherRestrictionServiceTest

      public VoucherRestrictionServiceTest()
  • Method Details

    • setUp

      public void setUp() throws Exception
      Overrides:
      setUp in class AbstractVoucherServiceTest
      Throws:
      Exception
    • testNormalProduct

      public void testNormalProduct()
      Tests the product category restriction with a normal product.
      • creates a cart with product "HW1100-0024" which is within the category "HW1100",
      • for "HW1100", if positive is true, the restriction is fulfilled,
      • for "HW1100", if positive is false, the restriction is NOT fulfilled,
      • for "HW2300", if positive is true, the restriction is NOT fulfilled,
      • for "HW2300", if positive is false, the restriction is fulfilled.
    • testVariantProduct

      public void testVariantProduct()
      Tests the product category restriction with a variant product. In this test, "ds453-00" belongs to "Sales" directly. "Alone" is a category which contains no products or sub-categories.
    • testVariantProduct2

      public void testVariantProduct2()
      Tests the product category restriction with a variant product. In this test, "ds453-01" doesn't belong to "Shoes" directly, but its base product "ds453" belongs to "Shoes" directly. "Sales" is super-category of "ds453-00", but has nothing to do with "ds453-01" or its base product "ds453" or their super-categories.