Developer 역할 Spring 골격 smoke (role-developer-live-v2-001)
Some checks failed
ci / test (pull_request) Failing after 1m20s

This commit is contained in:
forge-bot 2026-07-14 08:26:02 +00:00
parent a6d248bf1b
commit 64cb00e5a8

View file

@ -1,44 +1,26 @@
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.*;
import static org.assertj.core.api.Assertions.assertThat;
@SpringBootTest
class DeveloperServiceTest {
@Autowired
private DeveloperService developerService;
@Test
void contextLoads() {
assertNotNull(developerService);
}
private final DeveloperService service = new DeveloperService();
@Test
void getRole_returnsDeveloper() {
assertEquals("DEVELOPER", developerService.getRole());
assertThat(service.getRole()).isEqualTo("developer");
}
@Test
void isAuthorized_forCodeAction_returnsTrue() {
assertTrue(developerService.isAuthorized("code"));
void isActive_returnsTrue() {
assertThat(service.isActive()).isTrue();
}
@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"));
void describe_returnsDescription() {
String description = service.describe();
assertThat(description).contains("Developer").contains("active");
}
}