idioms Idiomatic Kotlin in tests: idiomatic stubbings In this article we will explore several ways of creating stubs… using Kotlin idioms.
mocking Stubbing with doAnswer vs doReturn – what's the difference? Most of the times while stubbing with Mockito or MockK you will use doReturn construction. But do you know, that you can stub your test double method in other way – with doAnswer. Let's take a look a both stubbing types.
mocking How to use MockK in Kotlin? Stubbing and Mocking coroutines made easy. How to mock suspend function in Kotlin? MockK is the solution. Code examples for coEvery, coAnswers, coReturns