Class CouponRedemptionWebServicesTest
java.lang.Object
de.hybris.platform.testframework.HybrisJUnit4Test
de.hybris.platform.servicelayer.ServicelayerBaseTest
de.hybris.platform.servicelayer.ServicelayerTest
de.hybris.platform.couponwebservices.test.webservices.CouponRedemptionWebServicesTest
- All Implemented Interfaces:
JaloSessionHolder
-
Field Summary
FieldsFields 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()voidthe test is for occ api of "/couponservices/v2/couponredemption/create" which provides create coupon redemption The test should detect the fail with ModelNotFoundErrorvoidthe test is for occ api of "/couponservices/v2/couponredemption/create" which provides create coupon redemption The test should detect the ValidationErrorvoidthe test is for occ api of "/couponservices/v2/couponredemption/create" which provides create coupon redemption The test should detect the CouponNotFoundErrorvoidvoidthe test is for occ api of "/couponservices/v2/couponredemption/create" which provides create coupon redemptionvoidThe test should detect the fail with 1 error: errors" : [ { "message" : "No single code coupon was found for code [COUPON1]", "type" : "CouponNotFoundError" } ]voidThe test should detect the fail with 1 error: errors" : [ { "message" : "No single code coupon found for invalid couponId [INVALID_TEST_COUPON1]", "type" : "CouponNotFoundError" } ]voidThe test should detect the fail with 1 error: errors" : [ { "message" : "Cannot find user with uid 'invalid_user", "type" : "UnknownIdentifierError" } ]voidthe test is for occ api of "/couponservices/v2/singlecodecouponredemption/get/{couponId}" which provides redemption status for a single-code coupon with given couponIdvoidMethods 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
-
Field Details
-
OAUTH_CLIENT_ID
- See Also:
-
OAUTH_CLIENT_PASS
- See Also:
-
-
Constructor Details
-
CouponRedemptionWebServicesTest
public CouponRedemptionWebServicesTest()
-
-
Method Details
-
setUp
- 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
-