Tagged Questions
3
votes
1answer
176 views
Inheritance in test classes
I have an interface Serializer with methods serialize and isSerializerFor. I created a first implementation of this using TDD, and ended up with a nice clean test case fully covering a nice clean ...
1
vote
3answers
325 views
Does non-virtual-by-default lead us to composition-over-inheritance?
There are some design guidelines about testable code in “The Art of Unit Testing”. The first one is “Make methods virtual by default”. I’m curious to know your idea about non-virtual-by-default ...
3
votes
4answers
396 views
Initializing derived classes in the same way
I have a class Base that has several children, say A, B, C. For testing purposes I'd like to mock those derived classes by deriving from them. So MockA derives from A, MockB derives from B and so on.
...