This is the mail archive of the mauve-discuss@sources.redhat.com mailing list for the Mauve project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Testing Abstract Classes



<<< text/plain; charset=ISO-8859-1; format=flowed: Unrecognized >>>
--- Begin Message ---
<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 ---

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]