Path: csiph.com!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Cecil Westerhof Newsgroups: comp.lang.java.programmer Subject: Re: Testing the functionality of sub classes Date: Sun, 20 Aug 2017 01:30:14 +0200 Organization: Decebal Computing Lines: 21 Message-ID: <87pobrf855.fsf@munus.decebal.nl> References: <87fucnh2wu.fsf@munus.decebal.nl> <87y3qffim5.fsf@munus.decebal.nl> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: mx02.eternal-september.org; posting-host="a3233d099e71e24d901953f13bac9801"; logging-data="18393"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18D9fAzBVdI7sUib4qoiaAwbbh4FEfTX6E=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) X-Homepage: http://www.decebal.nl/ Cancel-Lock: sha1:38AuBmR1x9wNd4w5Y+KLzdR/yfo= sha1:G6y01UySU9zqNHlrqpFHbQ1x688= Xref: csiph.com comp.lang.java.programmer:37305 Eric Sosman writes: > Thought #3: Once testing has made you confident of the abstract > superclass, you need not re-test the superclass methods for every > "real" subclass. Just write subclass-specific tests for the features > that are unique to the subclass. My sub classes use different JDBC drivers. I think I should test them all, because if one does not implement something correctly I would not find this. For example: when creating a new ResultSet through a Statement the previous generated should be closed. With the JDBC driver I use for SQLite3 the old ResultSet is not closed, but becomes a copy from the last generated. -- Cecil Westerhof Senior Software Engineer LinkedIn: http://www.linkedin.com/in/cecilwesterhof