From 2b9a0ab6cd1993edab0b7ce36386bb068c9c782c Mon Sep 17 00:00:00 2001 From: forge-bot Date: Tue, 14 Jul 2026 11:24:40 +0000 Subject: [PATCH 1/5] forge: open work branch for runtime-role-matrix-live-20260714112301-v11-developer-001-attempt-1-run-9c63dd5c6aca --- ...60714112301-v11-developer-001-attempt-1-run-9c63dd5c6aca.md | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 .forge/runtime-role-matrix-live-20260714112301-v11-developer-001-attempt-1-run-9c63dd5c6aca.md diff --git a/.forge/runtime-role-matrix-live-20260714112301-v11-developer-001-attempt-1-run-9c63dd5c6aca.md b/.forge/runtime-role-matrix-live-20260714112301-v11-developer-001-attempt-1-run-9c63dd5c6aca.md new file mode 100644 index 0000000..4d87ca5 --- /dev/null +++ b/.forge/runtime-role-matrix-live-20260714112301-v11-developer-001-attempt-1-run-9c63dd5c6aca.md @@ -0,0 +1,3 @@ +# runtime-role-matrix-live-20260714112301-v11-developer-001-attempt-1-run-9c63dd5c6aca + +Forge 이슈 작업 브랜치 `forge/runtime-role-matrix-live-20260714112301-v11-developer-001-attempt-1-run-9c63dd5c6aca`. -- 2.49.1 From a572e2a9b2eb84d16c97c9151f0ab2aaa100ddce Mon Sep 17 00:00:00 2001 From: forge-bot Date: Tue, 14 Jul 2026 11:24:49 +0000 Subject: [PATCH 2/5] =?UTF-8?q?Developer=20=EC=97=AD=ED=95=A0=20Spring=20?= =?UTF-8?q?=EA=B3=A8=EA=B2=A9=20smoke=20(runtime-role-matrix-live-20260714?= =?UTF-8?q?112301-v11-developer-001)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 pom.xml diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..f5c3824 --- /dev/null +++ b/pom.xml @@ -0,0 +1,43 @@ + + + 4.0.0 + + + org.springframework.boot + spring-boot-starter-parent + 3.2.5 + + + + com.example + runtime-role-matrix-live + 1.0.0-SNAPSHOT + jar + + + 17 + + + + + org.springframework.boot + spring-boot-starter + + + org.springframework.boot + spring-boot-starter-test + test + + + + + + + org.springframework.boot + spring-boot-maven-plugin + + + + \ No newline at end of file -- 2.49.1 From 944ebc2c2797d001f074081a812044b21f6c3cfd Mon Sep 17 00:00:00 2001 From: forge-bot Date: Tue, 14 Jul 2026 11:24:50 +0000 Subject: [PATCH 3/5] =?UTF-8?q?Developer=20=EC=97=AD=ED=95=A0=20Spring=20?= =?UTF-8?q?=EA=B3=A8=EA=B2=A9=20smoke=20(runtime-role-matrix-live-20260714?= =?UTF-8?q?112301-v11-developer-001)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/example/demo/DemoApplication.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 src/main/java/com/example/demo/DemoApplication.java diff --git a/src/main/java/com/example/demo/DemoApplication.java b/src/main/java/com/example/demo/DemoApplication.java new file mode 100644 index 0000000..2a9bdbe --- /dev/null +++ b/src/main/java/com/example/demo/DemoApplication.java @@ -0,0 +1,12 @@ +package com.example.demo; + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; + +@SpringBootApplication +public class DemoApplication { + + public static void main(String[] args) { + SpringApplication.run(DemoApplication.class, args); + } +} -- 2.49.1 From 0e753bfabf6f97e5848bc09eddd86b4e4da87ae6 Mon Sep 17 00:00:00 2001 From: forge-bot Date: Tue, 14 Jul 2026 11:24:51 +0000 Subject: [PATCH 4/5] =?UTF-8?q?Developer=20=EC=97=AD=ED=95=A0=20Spring=20?= =?UTF-8?q?=EA=B3=A8=EA=B2=A9=20smoke=20(runtime-role-matrix-live-20260714?= =?UTF-8?q?112301-v11-developer-001)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/example/demo/RoleService.java | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 src/main/java/com/example/demo/RoleService.java diff --git a/src/main/java/com/example/demo/RoleService.java b/src/main/java/com/example/demo/RoleService.java new file mode 100644 index 0000000..c87d474 --- /dev/null +++ b/src/main/java/com/example/demo/RoleService.java @@ -0,0 +1,24 @@ +package com.example.demo; + +import org.springframework.stereotype.Service; + +@Service +public class RoleService { + + public String getRoleName(String roleId) { + if (roleId == null || roleId.isBlank()) { + return "UNKNOWN"; + } + return switch (roleId.toUpperCase()) { + case "ADMIN" -> "Administrator"; + case "DEVELOPER" -> "Developer"; + case "VIEWER" -> "Viewer"; + default -> "Role: " + roleId; + }; + } + + public boolean isValidRole(String roleId) { + return roleId != null && !roleId.isBlank() && + roleId.matches("^[A-Z_]+$"); + } +} -- 2.49.1 From 0f89883634970c27b9860967454bbd871430aac2 Mon Sep 17 00:00:00 2001 From: forge-bot Date: Tue, 14 Jul 2026 11:24:52 +0000 Subject: [PATCH 5/5] =?UTF-8?q?Developer=20=EC=97=AD=ED=95=A0=20Spring=20?= =?UTF-8?q?=EA=B3=A8=EA=B2=A9=20smoke=20(runtime-role-matrix-live-20260714?= =?UTF-8?q?112301-v11-developer-001)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/example/demo/RoleServiceTest.java | 49 +++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 src/test/java/com/example/demo/RoleServiceTest.java diff --git a/src/test/java/com/example/demo/RoleServiceTest.java b/src/test/java/com/example/demo/RoleServiceTest.java new file mode 100644 index 0000000..4507ad4 --- /dev/null +++ b/src/test/java/com/example/demo/RoleServiceTest.java @@ -0,0 +1,49 @@ +package com.example.demo; + +import org.junit.jupiter.api.Test; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.test.context.SpringBootTest; + +import static org.junit.jupiter.api.Assertions.*; + +@SpringBootTest +class RoleServiceTest { + + @Autowired + private RoleService roleService; + + @Test + void getRoleName_returnsAdministratorForAdmin() { + assertEquals("Administrator", roleService.getRoleName("ADMIN")); + } + + @Test + void getRoleName_returnsDeveloperForDeveloper() { + assertEquals("Developer", roleService.getRoleName("DEVELOPER")); + } + + @Test + void getRoleName_returnsUnknownForNull() { + assertEquals("UNKNOWN", roleService.getRoleName(null)); + } + + @Test + void getRoleName_returnsUnknownForBlank() { + assertEquals("UNKNOWN", roleService.getRoleName(" ")); + } + + @Test + void isValidRole_returnsTrueForValidRoles() { + assertTrue(roleService.isValidRole("ADMIN")); + assertTrue(roleService.isValidRole("DEVELOPER")); + assertTrue(roleService.isValidRole("ROLE_VIEWER")); + } + + @Test + void isValidRole_returnsFalseForInvalidRoles() { + assertFalse(roleService.isValidRole(null)); + assertFalse(roleService.isValidRole("")); + assertFalse(roleService.isValidRole("admin")); + assertFalse(roleService.isValidRole("ADMIN123")); + } +} -- 2.49.1