Kotlin Testing
  • Newsletter Archive
  • DevSpeaker - polish IT community
  • darmowy kurs - 5 dni z jUnit5 (pl only)
mockk Android Getting Started IDE Kotlin MVVM Parametrized Spek TDD Testing assertions basics conference coroutines data-driven-test date examples exceptions junit kotest kotlintest ktor libraries meta mock-static mocking mockito mockito kotlin mockito-kotlin mocks newsletter okhttp parameterized reflection repository rest talk time
Stubbing with doAnswer vs doReturn – what's the difference?
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.
Read More
Jarosław Michalik
Mocking and stubbing suspend functions with MockK
mocking

Mocking and stubbing suspend functions with MockK

How to easily stub or mock suspend function in Kotlin? MockK is the solution. See MockK examples for mocking coroutines.
Read More
Jarosław Michalik

Tags

Android 4
Getting Started 1
IDE 2
Kotlin 3
MVVM 1
Parametrized 1
Spek 1
TDD 1
Testing 7
assertions 4
basics 6
conference 2
coroutines 2
data-driven-test 1
date 2
examples 2
exceptions 1
junit 2
kotest 4
kotlintest 2
ktor 1
libraries 1
meta 1
mock-static 2
mocking 3
mockito 3
mockito kotlin 1
mockito-kotlin 2
mockk 2
mocks 1
newsletter 7
okhttp 1
parameterized 1
reflection 1
repository 1
rest 1
talk 1
time 3

Recent Posts

Stubbing with doAnswer vs doReturn – what's the difference?
May 8, 2022
How to mock final classes in Kotlin with Mockito?
Feb 18, 2022
How to use jUnit4 & jUnit5 in one project?
Feb 12, 2022
Powered by Ghost
  • Newsletter Archive
  • DevSpeaker - polish IT community
  • darmowy kurs - 5 dni z jUnit5 (pl only)

Tags

Android 4
Getting Started 1
IDE 2
Kotlin 3
MVVM 1
Parametrized 1
Spek 1
TDD 1
Testing 7
assertions 4
basics 6
conference 2
coroutines 2
data-driven-test 1
date 2
examples 2
exceptions 1
junit 2
kotest 4
kotlintest 2
ktor 1
libraries 1
meta 1
mock-static 2
mocking 3
mockito 3
mockito kotlin 1
mockito-kotlin 2
mockk 2
mocks 1
newsletter 7
okhttp 1
parameterized 1
reflection 1
repository 1
rest 1
talk 1
time 3

Recent Posts

Stubbing with doAnswer vs doReturn – what's the difference?
May 8, 2022
How to mock final classes in Kotlin with Mockito?
Feb 18, 2022
How to use jUnit4 & jUnit5 in one project?
Feb 12, 2022