반응형
목차
- TestCoroutineScheduler
- StandardTestDispatcher
- UnconfinedTestDispatcher
- TestScope
- runTest
- 백그라운드 스코프
- 취소와 컨텍스트 전달 테스트하기
- 디스패처를 바꾸는 함수 테스트
- 함수 실행 중 일어나는 일 테스트
- 새로운 코루틴을 시작하는 함수 테스트
- 메인 디스패처 교체하기
- 룰이 있는 테스트 디스패처 설정하기
코틀린 코루틴 테스트 | Built with Notion
suspend fun test1(): User { val profile = repo.getUserProfile() val friends = repo.getFriends() return User(profile, friends) } suspend fun test2(): User { val profile = async { repo.getUserProfile() } val friends = async { repo.getFriends() } return User(
dongbin-note.notion.site
반응형
'Kotlin' 카테고리의 다른 글
[이펙티브 코틀린] 가독성 (0) | 2024.02.21 |
---|---|
[이펙티브 코틀린] 안정성 (0) | 2024.02.21 |
[kotlin] Flow (0) | 2024.01.07 |
[kotlin] Select (0) | 2024.01.07 |
[kotlin] Channel (0) | 2024.01.07 |