ZJA-9073 MockK, the idiomatic mocking framework for Kotlin | Devoxx

MockK, the idiomatic mocking framework for Kotlin


lang Programing Languages

If you've developed in Java, you will most likely have used the mocking framework Mockito. While it is a superb framework for mocking in Java, it doesn't really seem to suit Kotlin that well and there are certain limitations or annoyances which you need to get around such as mocking final classes due to the way that Mockito creates its mocks.

MockK is a mocking framework specifically for Kotlin developed by Oleksiy Pylypenko. MockK’s main philosophy is offering first-class support for Kotlin features and being able to write idiomatic Kotlin code when using it.

This session will serve as an introduction to MockK, showcase its features and how to use it in your unit tests.

Yannick De Turck Yannick De Turck

Yannick is a senior Java consultant and competence lead of the JVM languages competence center at Ordina Belgium. He’s very much interested in everything Java and Spring related as well as reactive programming, Kotlin, Lightbend technologies, software architectures, and coaching and enabling other colleagues.