I'm looking to add some junit to our code base.
We have a set of classes that inherited from an abstract base class. The inheritance is several layers deep (Base-> A, B, C ->C1, C2, C3->C3-1, etc). Sometimes someone overrides a method of a class (Class A) which has several child classes. But because of that, we get bad results for those in call children classes of Class A.
So, I'm looking for solutions to be able to try to prevent this and create a testing framework to deal with this.
My initial though is that we would need to create a TestSuite that would need to check that the TestClass has at least 1 test case for every method in the Base class via reflections. This would make sure the person who added a overridden a method in a mid-level Class know that their change will affect child classes.
Also, I was talking to someone who said that there might be library already out there that does this.
I'm looking for thoughts and examples of how to write tests to handle this scenario. Refactoring is not an option in this case.