Tagged Questions
17
votes
4answers
755 views
Do unit tests sometimes break encapsulation?
I very often hear the following: "If you want to test private methods, you'd better put that in another class and expose it."
While sometimes that's the case and we have a hiding concept inside our ...
4
votes
1answer
154 views
What is a “behavior rich object” and why would it be advantageous?
I am referring to the article Mocks aren't Stubs by Martin Fowler. When naming cases when he think "mockist" TDD will be advantageous, he said
It's particularly worth trying if you are having ...
15
votes
5answers
683 views
How are mock objects commonly misused?
I read an article recently which said that mock objects are often misunderstood and misused. Are there any clear mocking anti-patterns which I can look out for?