Spring Boot 3.5.14 결제 서비스 최소 구현 (BAIS-REVIEW-1783808744)
All checks were successful
ci / test (pull_request) Successful in 1m28s
All checks were successful
ci / test (pull_request) Successful in 1m28s
This commit is contained in:
parent
069912b283
commit
c8748afaab
1 changed files with 24 additions and 0 deletions
24
src/test/java/com/klaro/bais/PaymentServiceTest.java
Normal file
24
src/test/java/com/klaro/bais/PaymentServiceTest.java
Normal file
|
|
@ -0,0 +1,24 @@
|
||||||
|
package com.klaro.bais;
|
||||||
|
|
||||||
|
import org.junit.jupiter.api.Test;
|
||||||
|
import static org.junit.jupiter.api.Assertions.*;
|
||||||
|
|
||||||
|
class PaymentServiceTest {
|
||||||
|
|
||||||
|
private final PaymentService paymentService = new PaymentService();
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void testApprovePositiveAmount() {
|
||||||
|
assertTrue(paymentService.approve(100));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void testApproveZeroAmount() {
|
||||||
|
assertFalse(paymentService.approve(0));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void testApproveNegativeAmount() {
|
||||||
|
assertFalse(paymentService.approve(-100));
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue