I was waiting for this to be published since Octob...
# feed
o
@nfrankel you've reacted with "confused"... Perhaps, it is a golden opportunity to give me some feedback on what can be improved? Or maybe you have a question?
n
wrapping a static method calls inside an object is a classical way to ā€œmockā€ those static calls nothing kotlin specific...
āž• 1
o
True. Does it mean that Kotlin doesn't deserve an example how to do it? Especially, when my coworkers ask me such explicit question "how to mock this in Kotlin?" Somewhere in the future, the beginner learning kotlin and TDD will be curious what to do about that nasty static call. Wouldn't it be great if they could find such an example? While this is "a classical way" to fix that problem (20 or more years old) a lot of software (good) engineers are not aware of it…
n
i’m not arguing that it shouldn’t be documented (i also did it for the sake of my more junior colleagues) i’m just telling that it (imho) is not perhaps the most relevant place to advertise reddit /r/learnprogramming /r/programming /r/coding would be (again imho) much better fits
o
@nfrankel great! Thank you for the advice!
Do you think I should remove the link from here?
n
don’t worry! no harm done it all started with a smiley šŸ™‚