my mock is returning another mock, is that a sign of bad code / code smell? the thing is I been stuck for a day trying to figure out a better way to do it but I can't seem to find any alternatives
o
oleksiyp
10/26/2018, 6:13 PM
This tends to violate law of demetra, your code as you should ask to do something to objects you depend on, not objects of second line
oleksiyp
10/26/2018, 6:14 PM
But Im not idealist and do not recomend to follow it 100%, 80% should be enough
h
Hexa
10/27/2018, 2:52 PM
okay it makes sense. I will see if I can follow the demetra law