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 deleted file mode 100644 index 4d87ca5..0000000 --- a/.forge/runtime-role-matrix-live-20260714112301-v11-developer-001-attempt-1-run-9c63dd5c6aca.md +++ /dev/null @@ -1,3 +0,0 @@ -# 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`. diff --git a/pom.xml b/pom.xml deleted file mode 100644 index f5c3824..0000000 --- a/pom.xml +++ /dev/null @@ -1,43 +0,0 @@ - - - 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 diff --git a/src/main/java/com/example/demo/DemoApplication.java b/src/main/java/com/example/demo/DemoApplication.java deleted file mode 100644 index 2a9bdbe..0000000 --- a/src/main/java/com/example/demo/DemoApplication.java +++ /dev/null @@ -1,12 +0,0 @@ -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); - } -} diff --git a/src/main/java/com/example/demo/RoleService.java b/src/main/java/com/example/demo/RoleService.java deleted file mode 100644 index c87d474..0000000 --- a/src/main/java/com/example/demo/RoleService.java +++ /dev/null @@ -1,24 +0,0 @@ -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_]+$"); - } -} diff --git a/src/test/java/com/example/demo/RoleServiceTest.java b/src/test/java/com/example/demo/RoleServiceTest.java deleted file mode 100644 index 4507ad4..0000000 --- a/src/test/java/com/example/demo/RoleServiceTest.java +++ /dev/null @@ -1,49 +0,0 @@ -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")); - } -}