Class PromotionUserRestrictionTest

All Implemented Interfaces:
JaloSessionHolder

public class PromotionUserRestrictionTest extends ServicelayerTransactionalTest
Test the PromotionUserRestriction.
  • Constructor Details

    • PromotionUserRestrictionTest

      public PromotionUserRestrictionTest()
  • Method Details

    • setUp

      public void setUp() throws Exception
      Throws:
      Exception
    • testPromotionUserRestriction

      public void testPromotionUserRestriction() throws CalculationException
      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