Class MultiCodeCouponWebServicesTest
- All Implemented Interfaces:
JaloSessionHolder
-
Field Summary
Fields inherited from class de.hybris.platform.couponwebservices.test.webservices.AbstractCouponWebServicesTest
couponCodeGenerationService, couponWsUtils, OAUTH_CLIENT_ID, OAUTH_CLIENT_PASS, wsRequestBuilder, wsSecuredRequestBuilderFields 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 TypeMethodDescriptionprotected javax.ws.rs.core.ResponseputMultiCodeCouponWsDTO(String couponId, String couponName, String startDateVal, String endDateVal, String genConfigName) voidsetUp()voidthe test is for occ api of "/couponservices/v2/multicodecoupon/list}" which retrieves all multi-code coupons that are registered in the systemvoidvoidvoidvoidthe test is for occ api of "/couponservices/v2/multicodecoupon/get/{couponId}" which etrieves a multi-code coupon for a given couponIdvoidThe test should detect the fail with 2 errors: errors" : [ { "message" : "This field is required.", "reason" : "missing", "subject" : "couponId", "subjectType" : "parameter", "type" : "ValidationError" }, { "message" : "This field is required.", "reason" : "missing", "subject" : "codeGenerationConfiguration", "subjectType" : "parameter", "type" : "ValidationError" }voidthe test is for occ api of "/couponservices/v2/multicodecoupon/create" This endpoint creates a new multi-code coupon given in POST bodyvoidvoidthe test is for occ api of "/couponservices/v2/multicodecoupon/update/status" which updates status of a multi-code coupon as provided in POST bodyvoidthe test is for occ api of "/couponservices/v2/multicodecoupon/update/status" which updates status of a multi-code coupon as provided in POST bodyvoidThe test should detect the fail with 1 error: errors" : [ { "message" : "This field is required.", "reason" : "missing", "subject" : "couponId", "subjectType" : "parameter", "type" : "ValidationError" } ]voidvoidvoidvoidvoidvoidvoidvoidthe test is for occ api of "/couponservices/v2/multicodecoupon/update" which updates multi-code coupon data as provided in PUT bodyvoidvoidthe test is for occ api of "/couponservices/v2/multicodecoupon/validate/{couponCode}" which validates a multi-code coupon with given coupon codevoidvoidthe test is for occ api of "/couponservices/v2/multicodecoupon/validate/{couponCode}" which validates a multi-code coupon with given coupon code which is not activevoidMethods inherited from class de.hybris.platform.couponwebservices.test.webservices.AbstractCouponWebServicesTest
getCouponCodeGenerationService, getCouponWsUtils, testPutEmptyCouponStatusWsDTO, testPutInvalidCouponStatusWsDTO, updateCouponStatus, updateCouponStatusWithoutAuthorization, validateCouponUsingClientCredentials, validateCouponWithCustomerIdUsingClientCredentials, validateCouponWithoutAuthorization, validateMultiCodeCouponUsingClientCredentialsMethods 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
-
MultiCodeCouponWebServicesTest
public MultiCodeCouponWebServicesTest()
-
-
Method Details
-
setUp
- Throws:
Exception
-
testGetCouponsWithoutAuthorization
public void testGetCouponsWithoutAuthorization() -
testGetCouponUsingClientCredentials
public void testGetCouponUsingClientCredentials()the test is for occ api of "/couponservices/v2/multicodecoupon/get/{couponId}" which etrieves a multi-code coupon for a given couponId
- Parameters:
couponId-
-
shouldReturnMultiCodeCoupons
public void shouldReturnMultiCodeCoupons()the test is for occ api of "/couponservices/v2/multicodecoupon/list}" which retrieves all multi-code coupons that are registered in the system
-
shouldReturnMultiCodeCouponsSortedByNameWithDescOrder
public void shouldReturnMultiCodeCouponsSortedByNameWithDescOrder() -
shouldReturnMultiCodeCouponsPaged
public void shouldReturnMultiCodeCouponsPaged() -
testPostMultiCodeCouponWsDTO
public void testPostMultiCodeCouponWsDTO()the test is for occ api of "/couponservices/v2/multicodecoupon/create" This endpoint creates a new multi-code coupon given in POST body
- Parameters:
couponWsDTO-
-
testPostEmptyMultiCodeCouponWsDTO
public void testPostEmptyMultiCodeCouponWsDTO()The test should detect the fail with 2 errors: errors" : [ { "message" : "This field is required.", "reason" : "missing", "subject" : "couponId", "subjectType" : "parameter", "type" : "ValidationError" }, { "message" : "This field is required.", "reason" : "missing", "subject" : "codeGenerationConfiguration", "subjectType" : "parameter", "type" : "ValidationError" } -
putMultiCodeCouponWsDTO
-
testPutMultiCodeCouponWsDTO
public void testPutMultiCodeCouponWsDTO()the test is for occ api of "/couponservices/v2/multicodecoupon/update" which updates multi-code coupon data as provided in PUT body
- Parameters:
MultiCodeCouponWsDTO-
-
testPutMultiCodeActiveCouponWsDTO
public void testPutMultiCodeActiveCouponWsDTO() -
testPutEmptyMultiCodeCouponWsDTO
public void testPutEmptyMultiCodeCouponWsDTO()The test should detect the fail with 1 error: errors" : [ { "message" : "This field is required.", "reason" : "missing", "subject" : "couponId", "subjectType" : "parameter", "type" : "ValidationError" } ] -
testPutInvalidMultiCodeCouponWsDTO
public void testPutInvalidMultiCodeCouponWsDTO() -
testPutInvalidMultiCodeCouponWsDTO2
public void testPutInvalidMultiCodeCouponWsDTO2() -
testPutInvalidConfigMultiCodeCouponWsDTO
public void testPutInvalidConfigMultiCodeCouponWsDTO() -
testPutUsedConfigMultiCodeCouponWsDTO
public void testPutUsedConfigMultiCodeCouponWsDTO() -
testPutMultiCodeCouponWithDatesWsDTO
public void testPutMultiCodeCouponWithDatesWsDTO() -
testPutMultiCodeCouponWithInconsistentDatesWsDTO
public void testPutMultiCodeCouponWithInconsistentDatesWsDTO() -
testPutCouponStatusWithoutAuthorization
public void testPutCouponStatusWithoutAuthorization() -
testPutCouponStatusWsDTO1
public void testPutCouponStatusWsDTO1()the test is for occ api of "/couponservices/v2/multicodecoupon/update/status" which updates status of a multi-code coupon as provided in POST body
- Parameters:
couponId- ,active=false
-
testPutCouponStatusWsDTO2
public void testPutCouponStatusWsDTO2()the test is for occ api of "/couponservices/v2/multicodecoupon/update/status" which updates status of a multi-code coupon as provided in POST body
- Parameters:
couponId-active- =true
-
testPutEmptyStatusCouponStatusWsDTO
public void testPutEmptyStatusCouponStatusWsDTO() -
testValidateMultiCodeCouponWithoutAuthorization
public void testValidateMultiCodeCouponWithoutAuthorization() -
testValidateMultiCodeCouponUsingClientCredentials
public void testValidateMultiCodeCouponUsingClientCredentials()the test is for occ api of "/couponservices/v2/multicodecoupon/validate/{couponCode}" which validates a multi-code coupon with given coupon code
- Parameters:
couponId-
-
testValidateMultiCodeCouponWhenCouponIsNotActive
public void testValidateMultiCodeCouponWhenCouponIsNotActive()the test is for occ api of "/couponservices/v2/multicodecoupon/validate/{couponCode}" which validates a multi-code coupon with given coupon code which is not active
- Parameters:
couponId-
-
testValidateMultiCodeCouponWhenCouponIdIsUsed
public void testValidateMultiCodeCouponWhenCouponIdIsUsed()
-