diff --git a/.forge/BAIS-POLICY-1783705261-attempt-3.md b/.forge/BAIS-POLICY-1783705261-attempt-2.md similarity index 60% rename from .forge/BAIS-POLICY-1783705261-attempt-3.md rename to .forge/BAIS-POLICY-1783705261-attempt-2.md index 9f2d8e5..a0f3663 100644 --- a/.forge/BAIS-POLICY-1783705261-attempt-3.md +++ b/.forge/BAIS-POLICY-1783705261-attempt-2.md @@ -1,3 +1,3 @@ -# BAIS-POLICY-1783705261-attempt-3 +# BAIS-POLICY-1783705261-attempt-2 -Forge 이슈 작업 브랜치 `forge/BAIS-POLICY-1783705261-attempt-3`. +Forge 이슈 작업 브랜치 `forge/BAIS-POLICY-1783705261-attempt-2`. diff --git a/pom.xml b/pom.xml deleted file mode 100644 index 1d4db07..0000000 --- a/pom.xml +++ /dev/null @@ -1,39 +0,0 @@ - - 4.0.0 - com.example.baispolicy - bais-policy - 1.0-SNAPSHOT - jar - - - org.springframework.boot - spring-boot-starter-parent - 3.5.14 - - - - - 17 - - - - - org.springframework.boot - spring-boot-starter - - - org.springframework.boot - spring-boot-starter-test - test - - - - - - - org.springframework.boot - spring-boot-maven-plugin - - - - diff --git a/src/main/java/com/example/baispolicy/PaymentService.java b/src/main/java/com/example/baispolicy/PaymentService.java index 420d154..55047c9 100644 --- a/src/main/java/com/example/baispolicy/PaymentService.java +++ b/src/main/java/com/example/baispolicy/PaymentService.java @@ -3,8 +3,8 @@ package com.example.baispolicy; public class PaymentService { public String approve(String transactionId) { if (transactionId == null || transactionId.isBlank()) { - throw new IllegalArgumentException("Transaction ID must not be blank."); + throw new IllegalArgumentException("transactionId cannot be blank"); } return "APPROVED:" + transactionId; } -} +} \ No newline at end of file diff --git a/src/test/java/com/example/baispolicy/PaymentServiceTest.java b/src/test/java/com/example/baispolicy/PaymentServiceTest.java deleted file mode 100644 index e29ee02..0000000 --- a/src/test/java/com/example/baispolicy/PaymentServiceTest.java +++ /dev/null @@ -1,25 +0,0 @@ -package com.example.baispolicy; - -import org.junit.jupiter.api.Test; -import static org.junit.jupiter.api.Assertions.*; - -class PaymentServiceTest { - private final PaymentService paymentService = new PaymentService(); - - @Test - void testApprove_WithValidTransactionId_ShouldReturnApprovedMessage() { - String transactionId = "12345"; - String result = paymentService.approve(transactionId); - assertEquals("APPROVED:12345", result); - } - - @Test - void testApprove_WithBlankTransactionId_ShouldThrowException() { - assertThrows(IllegalArgumentException.class, () -> { - paymentService.approve(""); - }); - assertThrows(IllegalArgumentException.class, () -> { - paymentService.approve(null); - }); - } -}