[question] use extension function for mapper
Closed this issue · 3 comments
neronguyenvn commented
Could I ask why you choose class which needed to init for mappers instead of extension functions like toPresentation
or toData
for models ?
neronguyenvn commented
idea may be it hard for implement TDD
EranBoudjnah commented
Absolutely. The reason is that mocking extension functions is harder. While Mockk can do the job, it is slower than Mockito. I do not wish to exercise the mappers when I test the functions using them. This makes pinning down bugs easier.
neronguyenvn commented
thank for dedicate answer