Class CouponRedemptionWebServicesTest

All Implemented Interfaces:
JaloSessionHolder

@IntegrationTest public class CouponRedemptionWebServicesTest extends ServicelayerTest
  • Field Details

  • Constructor Details

    • CouponRedemptionWebServicesTest

      public CouponRedemptionWebServicesTest()
  • Method Details

    • setUp

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

      public void testGetSingleCodeCouponRedemptionWithoutAuthorization()
    • testGetSingleCodeCouponRedemptionUsingClientCredentials

      public void testGetSingleCodeCouponRedemptionUsingClientCredentials()

      the test is for occ api of "/couponservices​/v2​/singlecodecouponredemption​/get​/{couponId}" which provides redemption status for a single-code coupon with given couponId

      Parameters:
      couponId -
      customerId -
    • testGetSingleCodeCouponRedemptionInvalidCouponCodeError

      public void testGetSingleCodeCouponRedemptionInvalidCouponCodeError()
      The test should detect the fail with 1 error:
      errors" : [ {
      "message" : "No single code coupon found for invalid couponId [INVALID_TEST_COUPON1]",
      "type" : "CouponNotFoundError"
      } ]
    • testGetSingleCodeCouponRedemptionInvalidCustomerIdError

      public void testGetSingleCodeCouponRedemptionInvalidCustomerIdError()
      The test should detect the fail with 1 error:
      errors" : [ {
      "message" : "Cannot find user with uid 'invalid_user",
      "type" : "UnknownIdentifierError"
      } ]
    • testGetCouponRedemptionWhenMultiCodeCouponProvidedError

      public void testGetCouponRedemptionWhenMultiCodeCouponProvidedError()
      The test should detect the fail with 1 error:
      errors" : [ {
      "message" : "No single code coupon was found for code [COUPON1]",
      "type" : "CouponNotFoundError"
      } ]
    • testCreateCouponRedemptionWithoutAuthorization

      public void testCreateCouponRedemptionWithoutAuthorization()
      the test is for occ api of "/couponservices/v2/couponredemption/create" which provides create coupon redemption
    • testCreateCouponRedemptionUsingClientCredentials

      public void testCreateCouponRedemptionUsingClientCredentials()
    • testCreateCouponRedemptionEmptyCouponCodeError

      public void testCreateCouponRedemptionEmptyCouponCodeError()
      the test is for occ api of "/couponservices/v2/couponredemption/create" which provides create coupon redemption The test should detect the ValidationError
    • testCreateCouponRedemptionInvalidCouponCodeError

      public void testCreateCouponRedemptionInvalidCouponCodeError()
      the test is for occ api of "/couponservices/v2/couponredemption/create" which provides create coupon redemption The test should detect the CouponNotFoundError
    • testCreateCodeCouponRedemptionInvalidOrderError

      public void testCreateCodeCouponRedemptionInvalidOrderError()
      the test is for occ api of "/couponservices/v2/couponredemption/create" which provides create coupon redemption The test should detect the fail with ModelNotFoundError