Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Spring Junit testing using JMock

 
Anand Jain
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a Spring maven project and we are going to use JMock to test service/business/DAO layers of my project as suggested by client.
Can somebody please provide me the good link going through which I can understand and implement it?

I am not clear with the term mock objects. What is the need of mock objects? Why should I use it?Also I have heard of other mocking frameworks like Mockito or EasyMock. Is JMock better than those? or Which one is better to use even? This is just for knowledge sake as I will be using JMock only since it is suggested by the client
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34071
331
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The official getting started guide and cookbook are good.

All three mock frameworks are good. At the moment, Mockito is somewhat more advanced. All three frameworks are still enhancing though. The next version of jMock catches up.
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34071
331
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This question was also posted on stack overflow.

Please read BeForthrightWhenCrossPostingToOtherSites for why you should disclose when you post to more than one site.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic