Mockk is a free, open source mocking framework for Kotlin programming language. With some features similar to Mockito and Powermock, Mockk enables Kotlin developers to mock Kotlin features with a simple DSL, allowing for simple and concise testing code.
Mockk is a kotlin Mocking library that enables developers to test their code with a simple DSL. With familiar features from mockito and powermock, Mockk enables developers to test their
kotlin/java code in a simple but powerful fashion.
val car = mockk<Car>()
every { car.drive(Direction.NORTH) } returns Outcome.OK
car.drive(Direction.NORTH) // returns OK
verify { car.drive(Direction.NORTH) }