newMock() dynamically creates an easy mock (www.easymock.org)
implementation of the ErrorHandler interface. The mock is then manually
injected into the TaskExecutor.
There is no hivemind magic here, just easymock.
Achim
Joel Trunick wrote:
James,
Thanks for your help, but I'm not sure I understand, is that what's
being done here:
http://jakarta.jp/hivemind/hivemind-examples/panorama.html#Unit+Testing
Is newMock() re-registering HiveMind implementations or some such? BTW,
I use Maven2, so it compiles the .jar (with hivemodule), and I run tests
against that. Is that appropriate?
Thanks,
Joel
-----Original Message-----
From: James Carman [mailto:[EMAIL PROTECTED]
Sent: Friday, January 13, 2006 12:00 PM
To: [email protected]
Subject: RE: Testing Services
Don't test your services within the service registry. Test them
outside.
Then, you can manually inject your mock dependencies and test your
services
at will.
-----Original Message-----
From: Joel Trunick [mailto:[EMAIL PROTECTED]
Sent: Friday, January 13, 2006 11:57 AM
To: [email protected]
Subject: Testing Services
If I have a service-point X in module A, a module B with a dependency on
X, how do I specify a mock/test implementation of X in B, without
exposing that implementation to modules dependent on B?
Joel
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]