mockito / mockito-kotlin

Using Mockito with Kotlin
MIT License
3.09k stars 198 forks source link

wheneverBlocking confuses with similar stub methods #486

Open 07jasjeet opened 12 months ago

07jasjeet commented 12 months ago

Introduction

In the below screen shot, there are 3 stub methods which are almost same but differ in parameters supplied.

image

Problem

When a call to 2nd stub (testUsername) is executed, result of 3rd stub (testFamiliarUser) is returned. This is the main issue.

Variables

testUsername = "Jasjeet", testFamiliarUser = "Jasjeettest", testSomeOtherUser = "SomeOtherUser"

Analysis