• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

What is mocking framework

 
Poornima Sharma
Ranch Hand
Posts: 114
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Friends,

What is mocking framework, where and when can it be best used?

Thanks,
 
Hebert Coelho
Ranch Hand
Posts: 754
Eclipse IDE Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can find Mokito or Easy mock.

They can "trick" your code to think that they are using the real object.

Check out some samples of them.
 
Hussein Baghdadi
clojure forum advocate
Bartender
Posts: 3479
Clojure Mac Objective C
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hebert means Mockito.
Wikipedia has an excellent page about Mock Object.
 
Hebert Coelho
Ranch Hand
Posts: 754
Eclipse IDE Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hussein Baghdadi wrote:Hebert means Mockito.
Thanks! [=
 
Siitesh Hind
Ranch Hand
Posts: 51
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try jMock too just in case
 
Junilu Lacar
Bartender
Pie
Posts: 6529
21
Java Linux Mac Scala Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There's also PowerMock
 
Siitesh Hind
Ranch Hand
Posts: 51
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not sure of this mentioned on http://code.google.com/p/powermock/

1.Mockito 1.8+ usage (requires PowerMock 1.3+)
2.Mockito 1.7 usage (requires PowerMock 1.2.5)
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic