I'm currently writing an implementation of a JDBC driver (yes, you read that correctly) in a TDD manner and while I have only finished class stubs at this point and only some minor functionality, it just occured to me that since Statement
is a superclass for PreparedStatement
which is a superclass for CallableStatement
, what should I do when I really start to write tests for my implementations of those classes, which one of these should I do:
- Create a test suite for
Statement
and then extend that suite for additional tests forPreparedStatement
and then do the same forCallableStatement
. - Test each implementation individually ignoring the methods inherited from superclass(es).
- Rigorously test every single method individually for each implementation class; It is possible that some inherited methods work differently depending on implementation after all. Mild variation of this would be that I'd test all those inherited methods the implementation uses.
Number two feels the most natural but due to the reason I put to the third one I'm not that sure if it'd be wise to do so. So, what do you think I should do?