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
Tests the
VoucherRestrictionService-
Field Summary
Fields inherited from class de.hybris.platform.servicelayer.ServicelayerTest
importServiceFields inherited from class de.hybris.platform.testframework.HybrisJUnit4Test
jaloSession -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidsetUp()voidTests the product category restriction with a normal product.voidTests the product category restriction with a variant product.voidTests 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, isPrefetchModeNoneMethods inherited from class de.hybris.platform.servicelayer.ServicelayerBaseTest
autowireProperties, getBeanName, prepareApplicationContextAndSessionMethods inherited from class de.hybris.platform.testframework.HybrisJUnit4Test
establishJaloSession, finish, getOrCreateCurrency, getOrCreateLanguage, init, intenseChecksActivated, takeJaloSession
-
Constructor Details
-
VoucherRestrictionServiceTest
public VoucherRestrictionServiceTest()
-
-
Method Details
-
setUp
- Overrides:
setUpin classAbstractVoucherServiceTest- 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.
-