일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
- profile
- IntelliJ
- context
- xargs
- netsh
- Mac
- ssh
- find
- plugin
- 네트워크
- grep
- GIT
- tomcat
- Windows 10
- lsof
- 단축키
- bash
- port
- maVen
- Quartz
- Source
- Eclipse
- web.xml
- VirtualBox
- import
- 줄바꿈 문자
- resource
- Windows
- JavaScript
- vscode
- Today
- Total
목록Dev/junit (26)
develog
antkorwin.com/junit5/junit5_in_spring4.html How to use the JUnit5 in the Spring Framework 4 If you have a project with the Spring Framework older than 5.0 or a project with the SpringBoot older than 2.0 then you cannot find SpringExtension class in sources of spring libs. To fix this you need to add a Sam Brannen’s dependency: com.github.sbrann antkorwin.com

intellij 에서 @DisplayName 이 제대로 표시되지 않는 경우 아래 설정을 확인한다
build.gradle plugins { id 'java' } group 'org.example' version '1.0-SNAPSHOT' repositories { mavenCentral() } dependencies { testImplementation 'org.junit.jupiter:junit-jupiter:5.6.2' testCompile 'org.assertj:assertj-core:3.11.1' } test { useJUnitPlatform() }
@ExtendWith(MockitoExtension.class) class UserServiceTest { @Mock UserRepository userRepository; @InjectMocks UserService userService; @Test void test_00() throws Exception { assertThat(userService).isNotNull(); assertThat(userRepository).isNotNull(); } }
import com.fasterxml.jackson.databind.ObjectMapper; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.autoconfigure.web.servlet.WebMvcTest; import org.springframework.test.context.junit.jupiter.SpringExtension; import org.springframework.test.web.servlet.MockMvc..
import com.fasterxml.jackson.databind.ObjectMapper; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.test.web.servlet.MockMvc; import static org.springframework.test.web.servle..