I'm currently writing an implementation of the JDBC driver (yes, you read it right) in a TDD manner, and while I just finished the cool stubs and just some minor features, it just seemed to me that since then Statement has been a superclass for PreparedStatement , which is a superclass for CallableStatement , what should I do when I really start writing tests for my implementations of these classes, which one I need to do:
- Create a test case for
Statement , and then extend this package for additional tests for PreparedStatement , and then do the same for CallableStatement . - Test each implementation separately, ignoring methods inherited from the superclass (s).
- Strictly check each individual method for each implementation class; Perhaps some inherited methods work differently depending on the implementation. A soft change to this would be that I would check all of these inherited methods that the implementation uses.
Number two feels most natural, but because of the reason I put in third, I'm not sure it would be wise to do this. So what do you think I should do?
java unit-testing junit tdd
Esko
source share