Actually, my misunderstanding was that he was talking about testing the
interfaces themselves, as opposed to implementations of the interface.
Writing tests against an interface is a good idea, in general, as you can
easily re-use the code using composition, for all implementations of the
interface.
Peter
On 5/26/06, Paul BH <eye...@gm...> wrote:
>
> I think the confusion here is in the way the article is written...
>
> what I read from it is not that I need to test an interface, but I
> need to make sure that when I test a class that implements an
> interface I should make sure that the tests confirm the functional
> intention of the interface...
>
> The way he does this is to say write an abstract class which
> correlates to the *intention* of the interface, and write tests
> against that, then with the specific implementation of the class,
> write tests against that.
>
> So, I think what John Mark was actually asking is:
> "How do run the test methods written against a superclass in by subclass
> test"
>
> which I think, Peter, you looked at over here (although the example I
> found relies on your event driven implementation of asunit)....
>
>
>
> On 5/26/06, John Mark Hawley <ma...@ni...> wrote:
> > rationale: http://www.placebosoft.com/abstract-test.html
> >
> > Basically, while the compiler tests that interfaces are correct
> syntactically, having a set of tests to run on an interface means that yo=
u
> can verify that each interface method is actually doing what it should be=
in
> a coherent, meaningful way.
> >
> > Without an interface test, I can be sure that HamSandwich implements
> IFood, but I can't be sure the IFood method eat() doesn't turn the
> HamSandwich into a tree, when for all other IFoods eat() causes the IFood=
to
> dissappear.
> >
> > -john mark hawley
> >
> > Why are you testing interfaces?
> > Perhaps you can identify some kind of value that I can't see?
> >
> > Peter
> >
> >
> >
> >
> >
> > _______________________________________________
> > Asunit-users mailing list
> > Asu...@li...
> > https://lists.sourceforge.net/lists/listinfo/asunit-users
> >
>
>
> _______________________________________________
> Asunit-users mailing list
> Asu...@li...
> https://lists.sourceforge.net/lists/listinfo/asunit-users
>
|