I should probably clarify myself here and draw a distinction between "mock
objects" and "fake objects".
Mock object = typically very lighweight throwaway object whose implementation may be
written for a single test. Typically it does stuff like assert correct values are passed
in etc.
Fake object = A fake implementation of the interface or interfaces that typically can be
re-used by many different tests.
E.g. we could create a "fake group management layer" which takes the place of
JGroups and allows us to test distributed destinations quickly and in vm.
Or a fake database which just stores data in a map in memory - enough to run tests
against.
Or a fake MINA which just forwards request/responses from client to server calling the
correct objects at the correct times.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4105485#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...