Developer 역할 Spring 골격 smoke (runtime-role-matrix-live-20260714111146-v10-developer-001)
All checks were successful
ci / test (pull_request) Successful in 1m23s
All checks were successful
ci / test (pull_request) Successful in 1m23s
This commit is contained in:
parent
604376f52b
commit
6adf912b0f
1 changed files with 43 additions and 0 deletions
|
|
@ -0,0 +1,43 @@
|
|||
package com.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.assertFalse;
|
||||
import static org.junit.jupiter.api.Assertions.assertNotNull;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
@SpringBootTest
|
||||
class DeveloperServiceTest {
|
||||
|
||||
@Autowired
|
||||
private DeveloperService developerService;
|
||||
|
||||
@Test
|
||||
void contextLoads() {
|
||||
assertNotNull(developerService);
|
||||
}
|
||||
|
||||
@Test
|
||||
void getRole_ReturnsDeveloper() {
|
||||
String role = developerService.getRole();
|
||||
assertNotNull(role);
|
||||
assertTrue(role.contains("Developer"));
|
||||
}
|
||||
|
||||
@Test
|
||||
void getRoleDescription_ReturnsDescription() {
|
||||
String description = developerService.getRoleDescription();
|
||||
assertNotNull(description);
|
||||
assertTrue(description.length() > 0);
|
||||
}
|
||||
|
||||
@Test
|
||||
void isValidRole_ValidatesCorrectly() {
|
||||
assertTrue(developerService.isValidRole("Developer"));
|
||||
assertFalse(developerService.isValidRole("Admin"));
|
||||
assertFalse(developerService.isValidRole(""));
|
||||
assertFalse(developerService.isValidRole(null));
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue