プロジェクト
概要
The mocking library for Kotlin Multiplatform, easy to use, boilerplate-free and compiler plugin driven.
言語・ランタイム計測したスター増加
- 24時間
- 0
- 7日間
- +2
- 15日間
- +3
- 1か月
- 履歴を収集中
期間ごとの純増数です。期間は重複しており、日別の値ではありません。未計測の値は空欄です。スター数は注目度の指標であり、品質の保証ではありません。
README.md
オリジナルThe mocking library for Kotlin Multiplatform, easy to use, boilerplate-free and compiler plugin driven.
class BookServiceTest {
val repository = mock<BookRepository> {
everySuspend { findById(any()) } calls { (id: String) -> Book(id) }
}
val service = BookService(repository)
@Test
fun `rent should call repository for each book`() = runTest {
service.rentAll(listOf("1", "2"))
verifySuspend(exhaustiveOrder) {
repository.findById("1")
repository.findById("2")
}
}
}
As shown in the example above, this library is highly inspired by the MockK. If you have any experience with MockK, it should be easy to start with Mokkery!
Documentation is available here!
関連プロジェクトを探す
読み込み中…