Projets
Voir sur GitHub
lupuuss/Mokkery
À propos
The mocking library for Kotlin Multiplatform, easy to use, boilerplate-free and compiler plugin driven.
Langages et environnements d’exécutionProgression mesurée des étoiles
- in 24h
- 0
- in 7 days
- +2
- in 15 days
- +3
- in 1 month
- Historique en cours
Variations nettes sur des périodes qui se chevauchent, pas des totaux quotidiens. Les mesures absentes restent vides. Les étoiles indiquent l’intérêt, pas la qualité.
README.md
OriginalThe 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!
Explorer des projets similaires
Chargement…