Package de.hybris.platform.voucher
Class VoucherRestrictionServiceTest
- java.lang.Object
-
- de.hybris.platform.testframework.HybrisJUnit4Test
-
- de.hybris.platform.servicelayer.ServicelayerBaseTest
-
- de.hybris.platform.servicelayer.ServicelayerTest
-
- de.hybris.platform.servicelayer.ServicelayerTransactionalTest
-
- de.hybris.platform.voucher.AbstractVoucherServiceTest
-
- de.hybris.platform.voucher.VoucherRestrictionServiceTest
-
- All Implemented Interfaces:
JaloSessionHolder
@IntegrationTest public class VoucherRestrictionServiceTest extends AbstractVoucherServiceTest
Tests theVoucherRestrictionService
-
-
Field Summary
-
Fields inherited from class de.hybris.platform.servicelayer.ServicelayerTest
importService
-
Fields inherited from class de.hybris.platform.testframework.HybrisJUnit4Test
jaloSession
-
-
Constructor Summary
Constructors Constructor Description VoucherRestrictionServiceTest()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
setUp()
void
testNormalProduct()
Tests the product category restriction with a normal product.void
testVariantProduct()
Tests the product category restriction with a variant product.void
testVariantProduct2()
Tests the product category restriction with a variant product.-
Methods inherited from class de.hybris.platform.servicelayer.ServicelayerTest
createCoreData, createDefaultCatalog, createDefaultUsers, createHardwareCatalog, getApplicationContext, importCsv, importData, importData, importData, importStream, importStream, isPrefetchModeNone
-
Methods inherited from class de.hybris.platform.servicelayer.ServicelayerBaseTest
autowireProperties, getBeanName, prepareApplicationContextAndSession
-
Methods inherited from class de.hybris.platform.testframework.HybrisJUnit4Test
establishJaloSession, finish, getOrCreateCurrency, getOrCreateLanguage, init, intenseChecksActivated, takeJaloSession
-
-
-
-
Method Detail
-
setUp
public void setUp() throws java.lang.Exception
- Overrides:
setUp
in classAbstractVoucherServiceTest
- Throws:
java.lang.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.
-
-