From 175e5ed0936ba7cb6fe224220bef06b6b0e2ea58 Mon Sep 17 00:00:00 2001 From: forge-bot Date: Fri, 10 Jul 2026 18:02:12 +0000 Subject: [PATCH 1/4] forge: open work branch for BAIS-POLICY-1783705261-attempt-3 --- .forge/BAIS-POLICY-1783705261-attempt-3.md | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 .forge/BAIS-POLICY-1783705261-attempt-3.md diff --git a/.forge/BAIS-POLICY-1783705261-attempt-3.md b/.forge/BAIS-POLICY-1783705261-attempt-3.md new file mode 100644 index 0000000..9f2d8e5 --- /dev/null +++ b/.forge/BAIS-POLICY-1783705261-attempt-3.md @@ -0,0 +1,3 @@ +# BAIS-POLICY-1783705261-attempt-3 + +Forge 이슈 작업 브랜치 `forge/BAIS-POLICY-1783705261-attempt-3`. From 0294bea5748b87c8d79e1582d86b097c50987cc1 Mon Sep 17 00:00:00 2001 From: forge-bot Date: Fri, 10 Jul 2026 18:02:26 +0000 Subject: [PATCH 2/4] =?UTF-8?q?PaymentService=20=EC=A0=95=EC=B1=85=20?= =?UTF-8?q?=EA=B8=B0=EB=B0=98=20=EC=A0=84=ED=99=98=20(BAIS-POLICY-17837052?= =?UTF-8?q?61)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 pom.xml diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..1d4db07 --- /dev/null +++ b/pom.xml @@ -0,0 +1,39 @@ + + 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 + + + + From 1d34b488883d59ff6ce11aed173834c6ab89f9f9 Mon Sep 17 00:00:00 2001 From: forge-bot Date: Fri, 10 Jul 2026 18:02:27 +0000 Subject: [PATCH 3/4] =?UTF-8?q?PaymentService=20=EC=A0=95=EC=B1=85=20?= =?UTF-8?q?=EA=B8=B0=EB=B0=98=20=EC=A0=84=ED=99=98=20(BAIS-POLICY-17837052?= =?UTF-8?q?61)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/example/baispolicy/PaymentService.java | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 src/main/java/com/example/baispolicy/PaymentService.java diff --git a/src/main/java/com/example/baispolicy/PaymentService.java b/src/main/java/com/example/baispolicy/PaymentService.java new file mode 100644 index 0000000..420d154 --- /dev/null +++ b/src/main/java/com/example/baispolicy/PaymentService.java @@ -0,0 +1,10 @@ +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."); + } + return "APPROVED:" + transactionId; + } +} From 861121ef3b72580c5304fa0f4cd4336e1058f92b Mon Sep 17 00:00:00 2001 From: forge-bot Date: Fri, 10 Jul 2026 18:02:28 +0000 Subject: [PATCH 4/4] =?UTF-8?q?PaymentService=20=EC=A0=95=EC=B1=85=20?= =?UTF-8?q?=EA=B8=B0=EB=B0=98=20=EC=A0=84=ED=99=98=20(BAIS-POLICY-17837052?= =?UTF-8?q?61)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../baispolicy/PaymentServiceTest.java | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 src/test/java/com/example/baispolicy/PaymentServiceTest.java diff --git a/src/test/java/com/example/baispolicy/PaymentServiceTest.java b/src/test/java/com/example/baispolicy/PaymentServiceTest.java new file mode 100644 index 0000000..e29ee02 --- /dev/null +++ b/src/test/java/com/example/baispolicy/PaymentServiceTest.java @@ -0,0 +1,25 @@ +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); + }); + } +}