On Thu, Aug 21, 2008 at 6:06 PM, Kevin Brown <[EMAIL PROTECTED]> wrote:
> I think you misunderstood the purpose of ServletTestFixture. Nothing should
> have been inheriting from the fixtures, and ServletTestFixture was created
> to replace the things that had been inheriting from HttpTestFixture.

Yep, I misunderstood.  Why shouldn't things inherit from test
fixtures?  It prevents duplicate sets of mocks and repeated calls to
replay() and verify().

It might help to give an example or two of what you'd like to see in a
test case.  Maybe pick one of the classes extending GadgetTestFixture
or ServletTestFixture and describe what you'd like it to do instead?

IMHO, the best test cases don't use any fixtures at all, they've got
simple enough dependencies that they can do the injection themselves.
If test cases are too complex for that, then they need to have access
to a simple set of fixtures.  If we've got multiple fixtures in the
same test case each attempting to mock the same object in different
ways, that's bound to be confusing.

Reply via email to