-
Notifications
You must be signed in to change notification settings - Fork 101
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JUnit 5 -> Kotest로 마이그레이션한다. #529
Labels
디자인
Improvements or additions to documentation
Comments
Closed
#533 (comment) 에 이어 작성합니다.
|
Kotest Spring extension을 사용한 예@Transactional
@SpringBootTest
class LanguageServiceTest(
private val languageService: LanguageService
) : StringSpec({
extensions(SpringExtension)
"언어를 추가한다." {
val language = languageService.create(code = "ko", name = "한국어")
assertSoftly(language) {
id shouldNotBe 0
code shouldBe "ko"
name shouldBe "한국어"
}
}
}) Mock 객체 재사용을 방지하는 방법override fun extensions() = listOf(SpringExtension)
override fun isolationMode(): IsolationMode = IsolationMode.InstancePerLeaf Spring REST Docsval restdocs = ManualRestDocumentation()
beforeEach {
restdocs.beforeTest(javaClass, "name")
}
afterEach {
restdocs.afterTest()
} |
extra["kotlin-coroutines.version"] = "1.6.0"
|
This was referenced Jul 18, 2022
Closed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
관련 이슈: #63
The text was updated successfully, but these errors were encountered: