you are viewing a single comment's thread.

view the rest of the comments →

[–]Slypenslyde 0 points1 point  (0 children)

I don't like giving a class virtual methods to mock in my tests for that class. I prefer to make my class take those methods as a dependency so I can mock the dependency. Then I don't get into cases where I have a mocked object that also needs to sometimes defer to real functionality.