开发者

junit: mocks and stubs--reference links?

So I'm primarily a RoR developer at this stage in my career (still some lingering attachments to Python and Django) and I've been put on a java/ejb/tomcat project recently. I'm t开发者_开发百科rying to wrap my head around junit (it's been years since I used it last). Specifically wrt mocking and stubbing.

From perusing the API I haven't found any built in support for this and I've seen a few tools mentioned in links and other questions.

My own question is what is the basic approach to test isolation in junit and does anyone have any solid links to understanding this stuff? Mostly the first half of the question is the one I'm most interested in.


Use easymock or jMock to create mock objects. The documentation for both the projects are fairly good and there are lot of tutorials online.

This one is from one of my friend and I highly recommend it.

This one is from me explaining how to use mock in a spring application (but its no diff for others).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜