Spring Boot 3.5.14 결제 서비스 최소 구현 (BAIS-REVIEW-1783807356)
Some checks failed
ci / test (pull_request) Failing after 1m27s
Some checks failed
ci / test (pull_request) Failing after 1m27s
This commit is contained in:
parent
70c9801e82
commit
ad48f30670
1 changed files with 23 additions and 0 deletions
23
src/test/java/com/klaro/bais/PaymentServiceTest.java
Normal file
23
src/test/java/com/klaro/bais/PaymentServiceTest.java
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
package com.klaro.bais;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
|
||||
public class PaymentServiceTest {
|
||||
private final PaymentService paymentService = new PaymentService();
|
||||
|
||||
@Test
|
||||
public void testApproveWithPositiveAmount() {
|
||||
assertTrue(paymentService.approve(100));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testApproveWithZeroAmount() {
|
||||
assertFalse(paymentService.approve(0));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testApproveWithNegativeAmount() {
|
||||
assertFalse(paymentService.approve(-100));
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue