[jboss-dev] How can a project run in both AS 4.2.0 and AS 5.0?

Adrian abrock at redhat.com
Thu Jul 19 12:37:09 EDT 2007


On Thu, 2007-07-19 at 12:03 -0400, Bill Burke wrote:
> Mocking is gay and the worst idea I ever heard of.  You end up just 
> testing mock implementations.

It's exactly that kind of attitude that leads to software
that works great when there are no errors but falls on its
face when there is a problem or there are minor changes
in the implementation.

You need mocks to test errors. You need mocks
to test alternate possible implementations otherwise
you can end up depending on the implementation details 
rather than the real contract.

It was only when I wrote some "Mock pathological"
tests for Entity Beans, Resource Adapters and JDBC Drivers
and fixed the problems found, that our CMP and JCA containers 
stopped collapsing (unreleased locks and leaked connections)
at the first sign of trouble. :-)

> AOP and commons are an API issue, not an SPI one.  You're not gonna
> be able to mock AOP or commons even if you thought that was a good 
> idea.

We agree to an extent there. I think Tim was
actually being facetious which was why I didn't respond
to that part of his e-mail. :-)

There's little point developing your own mock AOP framework 
when there's no interface or alternative implementation.
You could, but then you could also implement your own
mock JDK for the same reason. ;-)

-- 
xxxxxxxxxxxxxxxxxxxxxxxxxxxx
Adrian Brock
Chief Scientist
JBoss, a division of Red Hat
xxxxxxxxxxxxxxxxxxxxxxxxxxxx




More information about the jboss-development mailing list