Showing posts with label tdd. Show all posts
Showing posts with label tdd. Show all posts

Tuesday, August 30, 2011

Testing Concrete Methods in Abstract Classes... With Mockito

There will probably come a time, especially if your life is TDD, that you will need to unit test an abstract class. More specifically, a concrete method in an abstract class. The standard response is, you should create a test implementation (a mock implementation) of that abstract class and then run your tests against that. However, if you're like me, then this smells wrong.