Compare commits
No commits in common. "d158b7bcc29a6e0967e2bf7e4f9cb229255ed2e1" and "7e923b732f0f0f880e6b9241f83eb0b216ae86c1" have entirely different histories.
d158b7bcc2
...
7e923b732f
5 changed files with 0 additions and 113 deletions
|
|
@ -1,3 +0,0 @@
|
||||||
# role-developer-live-v2-001-attempt-1-run-9e6f13ecd795
|
|
||||||
|
|
||||||
Forge 이슈 작업 브랜치 `forge/role-developer-live-v2-001-attempt-1-run-9e6f13ecd795`.
|
|
||||||
39
pom.xml
39
pom.xml
|
|
@ -1,39 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
|
||||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
||||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
|
||||||
<parent>
|
|
||||||
<groupId>org.springframework.boot</groupId>
|
|
||||||
<artifactId>spring-boot-starter-parent</artifactId>
|
|
||||||
<version>3.2.5</version>
|
|
||||||
<relativePath/>
|
|
||||||
</parent>
|
|
||||||
<groupId>com.example</groupId>
|
|
||||||
<artifactId>developer-role-smoke</artifactId>
|
|
||||||
<version>1.0.0-SNAPSHOT</version>
|
|
||||||
<name>Developer Role Smoke Test</name>
|
|
||||||
<description>Spring Boot skeleton for Developer role smoke test</description>
|
|
||||||
<properties>
|
|
||||||
<java.version>17</java.version>
|
|
||||||
</properties>
|
|
||||||
<dependencies>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.springframework.boot</groupId>
|
|
||||||
<artifactId>spring-boot-starter</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.springframework.boot</groupId>
|
|
||||||
<artifactId>spring-boot-starter-test</artifactId>
|
|
||||||
<scope>test</scope>
|
|
||||||
</dependency>
|
|
||||||
</dependencies>
|
|
||||||
<build>
|
|
||||||
<plugins>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.springframework.boot</groupId>
|
|
||||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
|
||||||
</plugin>
|
|
||||||
</plugins>
|
|
||||||
</build>
|
|
||||||
</project>
|
|
||||||
|
|
@ -1,12 +0,0 @@
|
||||||
package com.example.developer;
|
|
||||||
|
|
||||||
import org.springframework.boot.SpringApplication;
|
|
||||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
|
||||||
|
|
||||||
@SpringBootApplication
|
|
||||||
public class DeveloperRoleSmokeApplication {
|
|
||||||
|
|
||||||
public static void main(String[] args) {
|
|
||||||
SpringApplication.run(DeveloperRoleSmokeApplication.class, args);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,15 +0,0 @@
|
||||||
package com.example.developer.service;
|
|
||||||
|
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
|
|
||||||
@Service
|
|
||||||
public class DeveloperService {
|
|
||||||
|
|
||||||
public String getRole() {
|
|
||||||
return "DEVELOPER";
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean isAuthorized(String action) {
|
|
||||||
return "code".equals(action) || "review".equals(action) || "deploy".equals(action);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,44 +0,0 @@
|
||||||
package com.example.developer.service;
|
|
||||||
|
|
||||||
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 DeveloperServiceTest {
|
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private DeveloperService developerService;
|
|
||||||
|
|
||||||
@Test
|
|
||||||
void contextLoads() {
|
|
||||||
assertNotNull(developerService);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
|
||||||
void getRole_returnsDeveloper() {
|
|
||||||
assertEquals("DEVELOPER", developerService.getRole());
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
|
||||||
void isAuthorized_forCodeAction_returnsTrue() {
|
|
||||||
assertTrue(developerService.isAuthorized("code"));
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
|
||||||
void isAuthorized_forReviewAction_returnsTrue() {
|
|
||||||
assertTrue(developerService.isAuthorized("review"));
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
|
||||||
void isAuthorized_forDeployAction_returnsTrue() {
|
|
||||||
assertTrue(developerService.isAuthorized("deploy"));
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
|
||||||
void isAuthorized_forUnknownAction_returnsFalse() {
|
|
||||||
assertFalse(developerService.isAuthorized("admin"));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue