File tree Expand file tree Collapse file tree 6 files changed +7
-11
lines changed
main/java/br/com/grupo63/techchallenge/payment
test/java/br/com/grupo63/techchallenge/payment Expand file tree Collapse file tree 6 files changed +7
-11
lines changed Original file line number Diff line number Diff line change 176
176
<excludes >
177
177
<exclude >**/br/com/grupo63/techchallenge/payment/api/controller/dto/PaymentStatusResponseDTO.class</exclude >
178
178
<exclude >**/br/com/grupo63/techchallenge/payment/api/controller/dto/QRCodeResponseDTO.class</exclude >
179
- <exclude >**/br/com/grupo63/techchallenge/payment/gateway/order/dto/OrderDTO.java </exclude >
179
+ <exclude >**/br/com/grupo63/techchallenge/payment/gateway/order/dto/OrderDTO.class </exclude >
180
180
<exclude >**/br/com/grupo63/techchallenge/payment/gateway/payment/PaymentPersistenceEntity.class</exclude >
181
181
<exclude >**/br/com/grupo63/techchallenge/payment/gateway/payment/PaymentJpaAdapter.class</exclude >
182
182
<exclude >**/br/com/grupo63/techchallenge/payment/gateway/payment/MercadoPagoGateway.class</exclude >
Original file line number Diff line number Diff line change 2
2
3
3
import br .com .grupo63 .techchallenge .common .api .controller .AbstractAPIController ;
4
4
import br .com .grupo63 .techchallenge .common .exception .NotFoundException ;
5
- import br .com .grupo63 .techchallenge .common .exception .ValidationException ;
6
5
import br .com .grupo63 .techchallenge .payment .api .controller .dto .PaymentStatusResponseDTO ;
7
6
import br .com .grupo63 .techchallenge .payment .api .controller .dto .QRCodeResponseDTO ;
8
7
import br .com .grupo63 .techchallenge .payment .controller .PaymentController ;
Original file line number Diff line number Diff line change 1
1
package br .com .grupo63 .techchallenge .payment .controller ;
2
2
3
3
import br .com .grupo63 .techchallenge .common .exception .NotFoundException ;
4
- import br .com .grupo63 .techchallenge .common .exception .ValidationException ;
5
4
import br .com .grupo63 .techchallenge .payment .api .controller .dto .PaymentStatusResponseDTO ;
6
5
import br .com .grupo63 .techchallenge .payment .api .controller .dto .QRCodeResponseDTO ;
7
6
import br .com .grupo63 .techchallenge .payment .presenter .PaymentPresenter ;
Original file line number Diff line number Diff line change 1
1
package br .com .grupo63 .techchallenge .payment .gateway .payment ;
2
2
3
3
import br .com .grupo63 .techchallenge .common .gateway .repository .IJpaRepository ;
4
- import br .com .grupo63 .techchallenge .payment .domain .Payment ;
5
4
import org .springframework .data .jpa .repository .JpaRepository ;
6
5
import org .springframework .data .jpa .repository .Query ;
7
6
import org .springframework .stereotype .Repository ;
Original file line number Diff line number Diff line change 1
1
package br .com .grupo63 .techchallenge .payment .usecase ;
2
2
3
3
import br .com .grupo63 .techchallenge .common .exception .NotFoundException ;
4
- import br .com .grupo63 .techchallenge .common .exception .ValidationException ;
5
4
import br .com .grupo63 .techchallenge .payment .domain .PaymentStatus ;
6
5
7
6
public interface IPaymentUseCase {
8
7
9
- String startPayment (Long orderId ) throws NotFoundException , ValidationException ;
8
+ String startPayment (Long orderId ) throws NotFoundException ;
10
9
11
- void finishPayment (Long orderId ) throws NotFoundException , ValidationException ;
10
+ void finishPayment (Long orderId ) throws NotFoundException ;
12
11
13
- PaymentStatus getPaymentStatus (Long orderId ) throws NotFoundException , ValidationException ;
12
+ PaymentStatus getPaymentStatus (Long orderId ) throws NotFoundException ;
14
13
15
14
}
Original file line number Diff line number Diff line change @@ -60,7 +60,7 @@ void setUp() {
60
60
61
61
@ SneakyThrows
62
62
@ Test
63
- public void testGetPaymentStatus_EndToEnd () {
63
+ void testGetPaymentStatus_EndToEnd () {
64
64
when (paymentJpaRepository .findByOrderId (defaultOrderId )).thenReturn (Optional .of (defaultPaymentPersistenceEntity ));
65
65
when (orderGateway .getOrderById (defaultOrderId )).thenReturn (Optional .of (orderDTO ));
66
66
@@ -71,7 +71,7 @@ public void testGetPaymentStatus_EndToEnd() {
71
71
72
72
@ SneakyThrows
73
73
@ Test
74
- public void testStartPayment_EndToEnd () {
74
+ void testStartPayment_EndToEnd () {
75
75
when (paymentJpaRepository .save (any ())).thenReturn (defaultPaymentPersistenceEntity );
76
76
when (orderGateway .getOrderById (defaultOrderId )).thenReturn (Optional .of (orderDTO ));
77
77
when (mercadoPagoGateway .generateQRCode (defaultOrderId , totalPrice )).thenReturn (qrData );
@@ -83,7 +83,7 @@ public void testStartPayment_EndToEnd() {
83
83
84
84
@ SneakyThrows
85
85
@ Test
86
- public void testfinishPayment_EndToEnd () {
86
+ void testfinishPayment_EndToEnd () {
87
87
when (paymentJpaRepository .findByOrderId (defaultOrderId )).thenReturn (Optional .of (defaultPaymentPersistenceEntity ));
88
88
89
89
payment .setStatus (PaymentStatus .PAID );
You can’t perform that action at this time.
0 commit comments