https://kotlinlang.org logo
#feed
Title
# feed
o

Oleksii

02/06/2018, 7:45 PM
@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

nfrankel

02/06/2018, 10:04 PM
wrapping a static method calls inside an object is a classical way to “mock” those static calls nothing kotlin specific...
1
o

Oleksii

02/06/2018, 10:13 PM
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

nfrankel

02/06/2018, 10:35 PM
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

Oleksii

02/06/2018, 11:15 PM
@nfrankel great! Thank you for the advice!
Do you think I should remove the link from here?
n

nfrankel

02/07/2018, 7:48 AM
don’t worry! no harm done it all started with a smiley 🙂
2 Views