Package de.hybris.platform.promotions
Class PromotionUserRestrictionTest
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.promotions.PromotionUserRestrictionTest
- All Implemented Interfaces:
JaloSessionHolder
Test the PromotionUserRestriction.
-
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 user restriction under different circumstances.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
-
PromotionUserRestrictionTest
public PromotionUserRestrictionTest()
-
-
Method Details
-
setUp
- Throws:
Exception
-
testPromotionUserRestriction
Tests the user restriction under different circumstances.- background:
- demo is in customergroup,
- employee01 is in group11 that belongs to group01,
- besides, employee01 is in group12 that belongs to group05,
- employee02 is in group02,
- tests start:
- case 1
- promotion is fired for demo because he is in customergroup,
- case 2
- promotion is fired for employee01 because of the group hierarchy(group11-->group01),
- promotion is NOT fired for employee02 because he is not in group01,
- case 3
- promotion is fired for demo because he is exactly the user,
- case 4
- promotion is NOT fired for employee01 because he is not in group02,
- promotion is fired for employee02 because he is in group02,
- case 5
- promotion is fired for employee01 because of the group hierarchy(group12-->group05),
- promotion is NOT fired for employee02 because he is not in group05.
- Throws:
CalculationException
-