Developer 역할 Spring 골격 smoke #4
1 changed files with 32 additions and 0 deletions
|
|
@ -0,0 +1,32 @@
|
|||
package com.example.developer;
|
||||
|
||||
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.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
@SpringBootTest
|
||||
class DeveloperServiceTest {
|
||||
|
||||
@Autowired
|
||||
private DeveloperService developerService;
|
||||
|
||||
@Test
|
||||
void getRole_returnsDeveloper() {
|
||||
String role = developerService.getRole();
|
||||
assertEquals("Developer", role);
|
||||
}
|
||||
|
||||
@Test
|
||||
void getRoleDescription_containsDeveloper() {
|
||||
String description = developerService.getRoleDescription();
|
||||
assertTrue(description.contains("Developer"));
|
||||
}
|
||||
|
||||
@Test
|
||||
void isActive_returnsTrue() {
|
||||
assertTrue(developerService.isActive());
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue