Skip to content

Move AuditingEntityListener to common (#1286) #417

Move AuditingEntityListener to common (#1286)

Move AuditingEntityListener to common (#1286) #417

GitHub Actions / Promotion-Service-Unit-Test-Results succeeded Dec 13, 2024 in 1s

46 passed, 0 failed and 0 skipped

Tests passed successfully

Report Passed Failed Skipped Time
promotion/target/failsafe-reports/TEST-com.yas.promotion.service.PromotionServiceIT.xml 8✅ 54s
promotion/target/surefire-reports/TEST-com.yas.promotion.controller.PromotionControllerTest.xml 11✅ 962ms
promotion/target/surefire-reports/TEST-com.yas.promotion.service.ProductServiceTest.xml 5✅ 2s
promotion/target/surefire-reports/TEST-com.yas.promotion.service.PromotionServiceTest.xml 14✅ 13s
promotion/target/surefire-reports/TEST-com.yas.promotion.validation.PromotionValidatorTest.xml 8✅ 80ms

✅ promotion/target/failsafe-reports/TEST-com.yas.promotion.service.PromotionServiceIT.xml

8 tests were completed in 54s with 8 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
com.yas.promotion.service.PromotionServiceIT 8✅ 54s

✅ 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 962ms with 11 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
com.yas.promotion.controller.PromotionControllerTest 11✅ 962ms

✅ 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 2s with 5 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
com.yas.promotion.service.ProductServiceTest 5✅ 2s

✅ 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 80ms with 8 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
com.yas.promotion.validation.PromotionValidatorTest 8✅ 80ms

✅ 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