kosi-libs / MocKMP

A mocking processor for Kotlin Multiplatform
https://kosi-libs.org/mockmp
MIT License
183 stars 12 forks source link

Call count for mocks #44

Closed afonsograca closed 1 year ago

afonsograca commented 1 year ago

Are there any plans to add the ability of verifying how many times an expectation was called? Sometimes a simple yes/no is not enough to track down some unexpected behaviour. Keep up the great work. 🙌

SalomonBrys commented 1 year ago

Is this not sufficient?

verify {
    repeat(5) { myAmazingApi(isAny()) }
}
SalomonBrys commented 1 year ago

At the moment, we'll consider that using repeat is sufficient. Feel free to reopen this issue with a use case if that is not enough.