Feature/1003 payment provider #1243
Merged
GitHub Actions / Promotion-Service-Unit-Test-Results
succeeded
Oct 31, 2024 in 1s
46 passed, 0 failed and 0 skipped
✅ promotion/target/failsafe-reports/TEST-com.yas.promotion.service.PromotionServiceIT.xml
8 tests were completed in 52s with 8 passed, 0 failed and 0 skipped.
Test suite | Passed | Failed | Skipped | Time |
---|---|---|---|---|
com.yas.promotion.service.PromotionServiceIT | 8✅ | 52s |
✅ com.yas.promotion.service.PromotionServiceIT
✅ testUpdatePromotion_whenPromotionIsEmpty_throwNotFoundException
✅ createPromotion_ThenSuccess
✅ createPromotion_WhenExistedSlug_ThenDuplicatedExceptionThrown
✅ testUpdatePromotion_whenNormalCase_updatePromotion
✅ testDeletePromotion_normalCase_deletePromotion
✅ testDeletePromotion_existsPromotionUsageByPromotionId_throwBadRequestException
✅ getPromotionLists_existsPromotions_ThenPromotionListVm
✅ createPromotion_WhenEndDateBeforeStartDate_ThenDateRangeExceptionThrown
✅ promotion/target/surefire-reports/TEST-com.yas.promotion.controller.PromotionControllerTest.xml
11 tests were completed in 835ms with 11 passed, 0 failed and 0 skipped.
Test suite | Passed | Failed | Skipped | Time |
---|---|---|---|---|
com.yas.promotion.controller.PromotionControllerTest | 11✅ | 835ms |
✅ com.yas.promotion.controller.PromotionControllerTest
✅ testDeletePromotion_whenValidRequest_deleteSuccess
✅ testCreatePromotion_whenNameIsOverMaxLength_thenReturnBadRequest
✅ verify_promotion_with_valid_data_returns_expected_result
✅ testUpdatePromotion_whenValidRequest_thenReturnPromotionDetailVm
✅ testCreatePromotion_whenNameIsBlank_thenReturnBadRequest
✅ testCreatePromotion_whenDiscountPercentageIsGreaterThanHundred_thenReturnBadRequest
✅ test_getPromotion_success
✅ testCreatePromotion_whenDiscountPercentageIsSmallerThanZero_thenReturnBadRequest
✅ testListPromotions_whenValidRequest_thenReturnPromotionListVm
✅ testCreatePromotion_whenDiscountAmountIsSmallerThanZero_thenReturnBadRequest
✅ testCreatePromotion_whenRequestIsValid_thenReturnOk
✅ promotion/target/surefire-reports/TEST-com.yas.promotion.service.ProductServiceTest.xml
5 tests were completed in 3s with 5 passed, 0 failed and 0 skipped.
Test suite | Passed | Failed | Skipped | Time |
---|---|---|---|---|
com.yas.promotion.service.ProductServiceTest | 5✅ | 3s |
✅ com.yas.promotion.service.ProductServiceTest
✅ testGetProductByIds_ifNormalCase_returnProductVms
✅ testGetBrandByIds_ifNormalCase_returnBrandVms
✅ testGetProductByCategoryIds_ifNormalCase_returnProductVms
✅ testGetCategoryByIds_ifNormalCase_returnCategoryGetVms
✅ testGetProductByBrandIds_ifNormalCase_returnProductVms
✅ promotion/target/surefire-reports/TEST-com.yas.promotion.service.PromotionServiceTest.xml
14 tests were completed in 13s with 14 passed, 0 failed and 0 skipped.
Test suite | Passed | Failed | Skipped | Time |
---|---|---|---|---|
com.yas.promotion.service.PromotionServiceTest | 14✅ | 13s |
✅ com.yas.promotion.service.PromotionServiceTest
✅ verifyPromotion_applyToProduct_ThenSuccess
✅ testVerifyPromotion_ProductNotFound
✅ verifyPromotion_applyToCategory_ThenSuccess
✅ testVerifyPromotion_PromotionNotFound
✅ getPromotion_WhenNotExist_ThenNotFoundExceptionThrown
✅ createPromotion_ThenSuccess
✅ createPromotion_WhenExistedSlug_ThenDuplicatedExceptionThrown
✅ testVerifyPromotion_ExhaustedUsageQuantity
✅ getPromotion_ThenSuccess
✅ verifyPromotion_applyToBrand_ThenSuccess
✅ createPromotion_WhenCouponCodeAlreadyExisted_ThenDuplicatedExceptionThrown
✅ getPromotionList_ThenSuccess
✅ createPromotion_WhenEndDateBeforeStartDate_ThenDateRangeExceptionThrown
✅ testVerifyPromotion_InvalidOrderPrice
✅ promotion/target/surefire-reports/TEST-com.yas.promotion.validation.PromotionValidatorTest.xml
8 tests were completed in 69ms with 8 passed, 0 failed and 0 skipped.
Test suite | Passed | Failed | Skipped | Time |
---|---|---|---|---|
com.yas.promotion.validation.PromotionValidatorTest | 8✅ | 69ms |
✅ com.yas.promotion.validation.PromotionValidatorTest
✅ testIsValid_whenUsageLimitIs0_isValidFalse
✅ testIsValid_whenApplyToIsProductAndProductIdsIdEmpty_isValidFalse
✅ testIsValid_whenAppleToCategory_isValidTrue
✅ testIsValid_whenDiscountTypeIsFixedAndDiscountAmountIs0_isValidFalse
✅ testIsValid_whenApplyToIsCategoryAndCategoryIdsIdEmpty_isValidFalse
✅ testIsValid_whenAppleToBrand_isValidTrue
✅ testIsValid_whenApplyToIsBrandAndBrandIdsIdEmpty_isValidFalse
✅ testIsValid_whenAppleToProduct_isValidTrue
Loading