Class SingleCodeCouponWebServicesTest
- 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.ResponseputSingleCodeCouponWsDTO(String couponId, String couponName, String startDateVal, String endDateVal, Integer maxRedemptionsPerCustomer, Integer maxTotalRedemptions) voidsetUp()voidvoidvoidthe test is for occ api of "/couponservices/v2/singlecodecoupon/list" which retrieves all of the single-code coupons that are registered in the systemvoidvoidthe test is for occ api of "/couponservices/v2/singlecodecoupon/get/{couponId}" which retrieves a single-code coupon for a given couponIdvoidThe test should detect the fail with 1 error: errors" : [ { "message" : "This field is required.", "reason" : "missing", "subject" : "couponId", "subjectType" : "parameter", "type" : "ValidationError" } ]voidvoidvoidthe test is for occ api of "/couponservices/v2/singlecodecoupon/create" which creates a new single-code coupon object with the parameters provided in POST bodyvoidvoidthe test is for occ api of "/couponservices/v2/singlecodecoupon/update/status" which updates status of a single-code coupon as provided in POST body.voidvoidThe 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/singlecodecoupon/update" which updates single-code coupon data as provided in PUT bodyvoidthe test is for occ api of "/couponservices/v2/singlecodecoupon/validate/{couponId}" which validates a single-code coupon with a given couponIdvoidvoidvoidvoidvoidMethods 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
-
SingleCodeCouponWebServicesTest
public SingleCodeCouponWebServicesTest()
-
-
Method Details
-
setUp
- Throws:
Exception
-
testGetSingleCodeCouponsWithoutAuthorization
public void testGetSingleCodeCouponsWithoutAuthorization() -
shouldReturnSingleCodeCouponsSortedByNameWithDescOrder
public void shouldReturnSingleCodeCouponsSortedByNameWithDescOrder()the test is for occ api of "/couponservices/v2/singlecodecoupon/list" which retrieves all of the single-code coupons that are registered in the system
-
shouldReturnSingleCodeCouponsPaged
public void shouldReturnSingleCodeCouponsPaged() -
shouldReturnSingleCodeCoupons
public void shouldReturnSingleCodeCoupons() -
testGetSingleCodeCouponUsingClientCredentials
public void testGetSingleCodeCouponUsingClientCredentials()the test is for occ api of "/couponservices/v2/singlecodecoupon/get/{couponId}" which retrieves a single-code coupon for a given couponId
- Parameters:
couponId-
-
testPostSingleCodeCouponWsDTO
public void testPostSingleCodeCouponWsDTO()the test is for occ api of "/couponservices/v2/singlecodecoupon/create" which creates a new single-code coupon object with the parameters provided in POST body
- Parameters:
SingleCodeCouponWsDTO-
-
testPostEmptySingleCodeCouponWsDTO
public void testPostEmptySingleCodeCouponWsDTO()The test should detect the fail with 1 error: errors" : [ { "message" : "This field is required.", "reason" : "missing", "subject" : "couponId", "subjectType" : "parameter", "type" : "ValidationError" } ] -
testPostSingleCodeCouponWithDatesWsDTO
public void testPostSingleCodeCouponWithDatesWsDTO() -
testPostSingleCodeCouponWithInconsistentDatesWsDTO
public void testPostSingleCodeCouponWithInconsistentDatesWsDTO() -
putSingleCodeCouponWsDTO
-
testPutSingleCodeCouponWsDTO
public void testPutSingleCodeCouponWsDTO()the test is for occ api of "/couponservices/v2/singlecodecoupon/update" which updates single-code coupon data as provided in PUT body
- Parameters:
SingleCodeCouponWsDTO-
-
testPutSingleCodeActiveCouponWsDTO
public void testPutSingleCodeActiveCouponWsDTO() -
testPutEmptySingleCodeCouponWsDTO
public void testPutEmptySingleCodeCouponWsDTO()The test should detect the fail with 1 error: errors" : [ { "message" : "This field is required.", "reason" : "missing", "subject" : "couponId", "subjectType" : "parameter", "type" : "ValidationError" } ] -
testPutInvalidSingleCodeCouponWsDTO
public void testPutInvalidSingleCodeCouponWsDTO() -
testPutInvalidSingleCodeCouponWsDTO2
public void testPutInvalidSingleCodeCouponWsDTO2() -
testPutSingleCodeCouponWithInvalidDatesWsDTO
public void testPutSingleCodeCouponWithInvalidDatesWsDTO() -
testPutSingleCodeCouponWithDatesWsDTO
public void testPutSingleCodeCouponWithDatesWsDTO() -
testPutSingleCodeCouponWithInconsistentDatesWsDTO
public void testPutSingleCodeCouponWithInconsistentDatesWsDTO() -
testPutCouponStatusWithoutAuthorization
public void testPutCouponStatusWithoutAuthorization() -
testPutCouponStatusWsDTO1
public void testPutCouponStatusWsDTO1()the test is for occ api of "/couponservices/v2/singlecodecoupon/update/status" which updates status of a single-code coupon as provided in POST body.
- Parameters:
SingleCodeCouponWsDTO-
-
testPutCouponStatusWsDTO2
public void testPutCouponStatusWsDTO2() -
testPutEmptyStatusCouponStatusWsDTO
public void testPutEmptyStatusCouponStatusWsDTO() -
testValidateSingleCodeCouponWithoutAuthorization
public void testValidateSingleCodeCouponWithoutAuthorization() -
testValidateSingleCodeCouponUsingClientCredentials
public void testValidateSingleCodeCouponUsingClientCredentials()the test is for occ api of "/couponservices/v2/singlecodecoupon/validate/{couponId}" which validates a single-code coupon with a given couponId
- Parameters:
couponId-
-
testValidateSingleCodeCouponWhenCouponIsInvalid
public void testValidateSingleCodeCouponWhenCouponIsInvalid() -
testValidateSingleCodeCouponWithCustomerId
public void testValidateSingleCodeCouponWithCustomerId() -
testValidateSingleCodeCouponWithCustomerIdWhenCouponIsNotValid
public void testValidateSingleCodeCouponWithCustomerIdWhenCouponIsNotValid() -
testValidateSingleCodeCouponWhenCouponCodeIsNotFound
public void testValidateSingleCodeCouponWhenCouponCodeIsNotFound()
-