#1180 & #1237 create payment and order in paypal #684
54 passed, 3 failed and 0 skipped
✅ order/target/surefire-reports/TEST-com.yas.order.controller.CheckoutControllerTest.xml
5 tests were completed in 458ms with 5 passed, 0 failed and 0 skipped.
Test suite | Passed | Failed | Skipped | Time |
---|---|---|---|---|
com.yas.order.controller.CheckoutControllerTest | 5✅ | 458ms |
✅ com.yas.order.controller.CheckoutControllerTest
✅ testUpdatePaymentMethod_whenRequestIsValid_thenReturnNoContent
✅ testUpdateCheckoutStatus_whenRequestIsValid_thenReturnLong
✅ testCreateCheckout_whenRequestIsValid_thenReturnCheckoutVm
✅ testGetCheckoutById_whenRequestIsValid_thenReturnCheckoutVm
✅ testGetPendingCheckoutDetailsById_whenRequestIsValid_thenReturnCheckoutVm
✅ order/target/surefire-reports/TEST-com.yas.order.controller.OrderControllerTest.xml
8 tests were completed in 2s with 8 passed, 0 failed and 0 skipped.
Test suite | Passed | Failed | Skipped | Time |
---|---|---|---|---|
com.yas.order.controller.OrderControllerTest | 8✅ | 2s |
✅ com.yas.order.controller.OrderControllerTest
✅ testExportCsv_whenRequestIsValid_thenReturnCsvFile
✅ testUpdateOrderPaymentStatus_whenRequestIsValid_thenReturnPaymentOrderStatusVm
✅ testGetOrders_whenRequestIsValid_thenReturnOrderListVm
✅ testCreateOrder_whenRequestIsValid_thenReturnOrderVm
✅ testGetOrderWithItemsById_whenRequestIsValid_thenReturnOrderVm
✅ testCheckOrder_whenRequestIsValid_thenReturnOrderExistsByProductAndUserGetVm
✅ testGetLatestOrders_whenRequestIsValid_thenReturnOrderListVm
✅ testGetMyOrders_whenRequestIsValid_thenReturnOrderGetVm
❌ order/target/surefire-reports/TEST-com.yas.order.kafka.consumer.OrderStatusConsumerTest.xml
7 tests were completed in 475ms with 4 passed, 3 failed and 0 skipped.
Test suite | Passed | Failed | Skipped | Time |
---|---|---|---|---|
com.yas.order.kafka.consumer.OrderStatusConsumerTest | 4✅ | 3❌ | 475ms |
❌ com.yas.order.kafka.consumer.OrderStatusConsumerTest
✅ testListen_whenHaveNoAfter_shouldNotThing
✅ testListen_whenConsumerRecordIsNull_shouldNotThing
❌ testListen_whenCreatePaymentFailure_shouldThrowException
org.opentest4j.AssertionFailedError: Expected com.yas.commonlibrary.exception.BadRequestException to be thrown, but nothing was thrown.
❌ testListen_whenCreatePaymentSuccess_shouldProcessCheckoutEvent
Wanted but not invoked:
✅ testListen_whenProgressIsNotStockLocked_shouldNotThing
❌ testListen_whenCheckoutIsNotFound_shouldNotSave
org.opentest4j.AssertionFailedError: Expected com.yas.commonlibrary.exception.NotFoundException to be thrown, but nothing was thrown.
✅ testListen_whenIsNotPaymentProcess_shouldNotThing
✅ order/target/surefire-reports/TEST-com.yas.order.kafka.consumer.PaymentUpdateConsumerTest.xml
7 tests were completed in 2s with 7 passed, 0 failed and 0 skipped.
Test suite | Passed | Failed | Skipped | Time |
---|---|---|---|---|
com.yas.order.kafka.consumer.PaymentUpdateConsumerTest | 7✅ | 2s |
✅ com.yas.order.kafka.consumer.PaymentUpdateConsumerTest
✅ testListen_whenEventAfterPaypalOrderIdEqualsBefore_shouldNotUpdateCheckout
✅ testListen_whenValueDoesNotContainOpField_shouldNotUpdateCheckout
✅ testListen_whenEventIsUpdateAndAttributesChanged_shouldUpdateCheckout
✅ testListen_whenEventDoesNotContainAfterField_shouldNotUpdateCheckout
✅ testListen_whenEventAfterPaypalOrderIdIsNull_shouldNotUpdateCheckout
✅ testListen_whenEventDoesNotContainBeforeField_shouldNotUpdateCheckout
✅ testListen_whenConsumerRecordIsNull_shouldLogInfoAndDoNothing
✅ order/target/surefire-reports/TEST-com.yas.order.mapper.CheckoutMapperTest.xml
4 tests were completed in 97ms with 4 passed, 0 failed and 0 skipped.
Test suite | Passed | Failed | Skipped | Time |
---|---|---|---|---|
com.yas.order.mapper.CheckoutMapperTest | 4✅ | 97ms |
✅ com.yas.order.mapper.CheckoutMapperTest
✅ testCheckoutItemToVm_convertCheckoutItemCorrectly
✅ testCheckoutItemPostVmToModel_convertToCorrectCheckoutItem
✅ testCheckoutPostVmToModel_convertToCorrectCheckout
✅ testCheckoutToVm_convertToCheckoutVmCorrectly
✅ order/target/surefire-reports/TEST-com.yas.order.service.CartServiceTest.xml
1 tests were completed in 24ms with 1 passed, 0 failed and 0 skipped.
Test suite | Passed | Failed | Skipped | Time |
---|---|---|---|---|
com.yas.order.service.CartServiceTest | 1✅ | 24ms |
✅ com.yas.order.service.CartServiceTest
✅ testDeleteCartItems_ifNormalCase_shouldNoException
✅ order/target/surefire-reports/TEST-com.yas.order.service.CheckoutServiceTest.xml
12 tests were completed in 2s with 12 passed, 0 failed and 0 skipped.
Test suite | Passed | Failed | Skipped | Time |
---|---|---|---|---|
com.yas.order.service.CheckoutServiceTest | 12✅ | 2s |
✅ com.yas.order.service.CheckoutServiceTest
✅ testUpdateCheckoutPaymentMethod_whenPaymentMethodIdIsNull_thenDoNotUpdate
✅ testUpdateCheckout_whenIdIsNull_throwBadRequestException
✅ testUpdateCheckout_whenNormalCase_thenUpdateCheckout
✅ testGetCheckoutPendingStateWithItemsById_whenNormalCase_returnCheckoutVm
✅ testFindCheckoutById_whenNotFound_throwNotFoundException
✅ testGetCheckoutPendingStateWithItemsById_whenNotEqualsCreateBy_throwForbidden
✅ testCreateCheckout_whenNormalCase_returnCheckout
✅ testGetCheckoutPendingStateWithItemsById_whenNormalCase_returnCheckoutVmWithoutCheckoutItems
✅ testUpdateCheckoutPaymentMethod_whenCheckoutNotFound_thenThrowNotFoundException
✅ testUpdateCheckoutPaymentMethod_whenCheckoutExists_thenUpdatePaymentMethod
✅ testCreateCheckout_whenCheckoutItemsIsEmpty_returnCheckoutWithoutCheckoutItems
✅ testFindCheckoutWithItemsById_whenNormalCase_returnCheckoutVm
✅ order/target/surefire-reports/TEST-com.yas.order.service.CustomerServiceTest.xml
1 tests were completed in 487ms with 1 passed, 0 failed and 0 skipped.
Test suite | Passed | Failed | Skipped | Time |
---|---|---|---|---|
com.yas.order.service.CustomerServiceTest | 1✅ | 487ms |
✅ com.yas.order.service.CustomerServiceTest
✅ testGetCustomer_ifNormalCase_returnCustomerVm
✅ order/target/surefire-reports/TEST-com.yas.order.service.PaymentServiceTest.xml
1 tests were completed in 8ms with 1 passed, 0 failed and 0 skipped.
Test suite | Passed | Failed | Skipped | Time |
---|---|---|---|---|
com.yas.order.service.PaymentServiceTest | 1✅ | 8ms |
✅ com.yas.order.service.PaymentServiceTest
✅ testCreatePaymentFromEvent_ifNormalCase_returnLong
✅ order/target/surefire-reports/TEST-com.yas.order.service.PromotionServiceTest.xml
1 tests were completed in 74ms with 1 passed, 0 failed and 0 skipped.
Test suite | Passed | Failed | Skipped | Time |
---|---|---|---|---|
com.yas.order.service.PromotionServiceTest | 1✅ | 74ms |
✅ com.yas.order.service.PromotionServiceTest
✅ testUpdateUsagePromotion_ifNormalCase_shouldNoException
✅ order/target/surefire-reports/TEST-com.yas.order.service.TaxServiceTest.xml
1 tests were completed in 16ms with 1 passed, 0 failed and 0 skipped.
Test suite | Passed | Failed | Skipped | Time |
---|---|---|---|---|
com.yas.order.service.TaxServiceTest | 1✅ | 16ms |
✅ com.yas.order.service.TaxServiceTest
✅ testGetTaxPercentByAddress_ifNormalCase_returnCustomerVm
✅ order/target/surefire-reports/TEST-com.yas.order.specification.OrderSpecificationTest.xml
8 tests were completed in 861ms with 8 passed, 0 failed and 0 skipped.
Test suite | Passed | Failed | Skipped | Time |
---|---|---|---|---|
com.yas.order.specification.OrderSpecificationTest | 8✅ | 861ms |
✅ com.yas.order.specification.OrderSpecificationTest
✅ testHasCreatedBy_whenNormalCase_thenSuccess
✅ testWithCountryName_whenNormalCase_thenSuccess
✅ testWithOrderStatusList_whenNormalCase_thenSuccess
✅ testWithDateRange_whenNormalCase_thenSuccess
✅ testHasOrderStatus_whenNormalCase_thenSuccess
✅ testHasProductNameInOrderItems_whenNormalCase_thenSuccess
✅ testWithBillingPhoneNumber_whenNormalCase_thenSuccess
✅ testWithEmail_whenNormalCase_thenSuccess
✅ order/target/surefire-reports/TEST-com.yas.order.utils.AuthenticationUtilsTest.xml
1 tests were completed in 3ms with 1 passed, 0 failed and 0 skipped.
Test suite | Passed | Failed | Skipped | Time |
---|---|---|---|---|
com.yas.order.utils.AuthenticationUtilsTest | 1✅ | 3ms |
✅ com.yas.order.utils.AuthenticationUtilsTest
✅ testGetCurrentUserId_existsCurrentUserId_returnCurrentUserId
Annotations
github-actions / Order-Service-Unit-Test-Results
com.yas.order.kafka.consumer.OrderStatusConsumerTest ► testListen_whenCreatePaymentFailure_shouldThrowException
Failed test found in:
order/target/surefire-reports/TEST-com.yas.order.kafka.consumer.OrderStatusConsumerTest.xml
Error:
org.opentest4j.AssertionFailedError: Expected com.yas.commonlibrary.exception.BadRequestException to be thrown, but nothing was thrown.
Raw output
org.opentest4j.AssertionFailedError: Expected com.yas.commonlibrary.exception.BadRequestException to be thrown, but nothing was thrown.
at org.junit.jupiter.api.AssertionFailureBuilder.build(AssertionFailureBuilder.java:152)
at org.junit.jupiter.api.AssertThrows.assertThrows(AssertThrows.java:73)
at org.junit.jupiter.api.AssertThrows.assertThrows(AssertThrows.java:35)
at org.junit.jupiter.api.Assertions.assertThrows(Assertions.java:3115)
at com.yas.order.kafka.consumer.OrderStatusConsumerTest.testListen_whenCreatePaymentFailure_shouldThrowException(OrderStatusConsumerTest.java:191)
at java.base/java.lang.reflect.Method.invoke(Method.java:580)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1596)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1596)
github-actions / Order-Service-Unit-Test-Results
com.yas.order.kafka.consumer.OrderStatusConsumerTest ► testListen_whenCreatePaymentSuccess_shouldProcessCheckoutEvent
Failed test found in:
order/target/surefire-reports/TEST-com.yas.order.kafka.consumer.OrderStatusConsumerTest.xml
Error:
Wanted but not invoked:
Raw output
Wanted but not invoked:
checkoutRepository.findById(<any>);
-> at com.yas.order.kafka.consumer.OrderStatusConsumerTest.testListen_whenCreatePaymentSuccess_shouldProcessCheckoutEvent(OrderStatusConsumerTest.java:164)
Actually, there were zero interactions with this mock.
at com.yas.order.kafka.consumer.OrderStatusConsumerTest.testListen_whenCreatePaymentSuccess_shouldProcessCheckoutEvent(OrderStatusConsumerTest.java:164)
at java.base/java.lang.reflect.Method.invoke(Method.java:580)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1596)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1596)
github-actions / Order-Service-Unit-Test-Results
com.yas.order.kafka.consumer.OrderStatusConsumerTest ► testListen_whenCheckoutIsNotFound_shouldNotSave
Failed test found in:
order/target/surefire-reports/TEST-com.yas.order.kafka.consumer.OrderStatusConsumerTest.xml
Error:
org.opentest4j.AssertionFailedError: Expected com.yas.commonlibrary.exception.NotFoundException to be thrown, but nothing was thrown.
Raw output
org.opentest4j.AssertionFailedError: Expected com.yas.commonlibrary.exception.NotFoundException to be thrown, but nothing was thrown.
at org.junit.jupiter.api.AssertionFailureBuilder.build(AssertionFailureBuilder.java:152)
at org.junit.jupiter.api.AssertThrows.assertThrows(AssertThrows.java:73)
at org.junit.jupiter.api.AssertThrows.assertThrows(AssertThrows.java:35)
at org.junit.jupiter.api.Assertions.assertThrows(Assertions.java:3115)
at com.yas.order.kafka.consumer.OrderStatusConsumerTest.testListen_whenCheckoutIsNotFound_shouldNotSave(OrderStatusConsumerTest.java:138)
at java.base/java.lang.reflect.Method.invoke(Method.java:580)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1596)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1596)