DEV Community

Discussion on: Testing Kotlin Lambda Invocations without Mocking

Collapse
 
bkahlert profile image
Björn Kahlert

I would say you rediscovered the power of interfaces, as this was the only way of mocking (to what I know) before mocking frameworks arose.
What you described does not only apply to Kotlin or Lambdas but all programming languages with interface support.
So thanks to Eyal Guthmann for his suggestion and to you for writing this article. The Kotlin library I'm working on (Koodies) renounces mocking frameworks completely.