= MocKMP :icons: font :version: 1.17.0
A Kotlin/Multiplatform Kotlin Symbol Processor that generates Mocks & Fakes.
Built in collaboration with https://www.deezer.com/[Deezer].
== Installation
plugins { kotlin("multiplatform") id("org.kodein.mock.mockmp") version "{version}" }
kotlin { // Your Koltin/Multiplatform configuration }
== Example
class MyTest : TestsWithMocks() { override fun setUpMocks() = injectMocks(mocker) //<1>
@Mock lateinit var view: View
@Fake lateinit var model: Model
val controller by withMocks { Controller(view = view, firstModel = model) }
@Test fun controllerTest() {
every { view.render(isAny()) } returns true
controller.start()
verify { view.render(model) }
}
== Read more
See https://kosi-libs.org/mockmp/[MocKMP Documentation].