--- Begin Message ---
- From: Artur Biesiadowski <abies00 at wp dot pl>
- To: Mauve Discuss <mauve-discuss at sources dot redhat dot com>
- Date: Mon, 23 Dec 2002 20:40:54 +0100
- Subject: Re: Testing Abstract Classes
- References: <20021223192713.GA2597@tigger.localdomain>
- Reply-to: abies at pg dot gda dot pl
<div class="moz-text-flowed" style="font-family: -moz-fixed">Daryl Lee wrote:
I ran JDK 1.1 tests of FileReader before noticing it was an abstract class.
Since an abstract class can't be instantiated, is the notion of testing it
meaningful? If so, what would be a good general approach? Pending an
answer, I'm going to skip over this and all other abstracts.
We are talking about testing implementation behavior, not interfaces.
Just create a test which subclasses FileReader and calls all
non-abstract methods in parent class to check if their results are ok.
You might need to implement some of abstract methods in meaningful way,
but this can actually make testing easier.
Artur
</div>
--- End Message ---