This week's book giveaway is in the OCAJP 8 forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line!
See this thread for details.
The moose likes Testing and the fly likes How to mock object which doesnt implement any interface using EasyMock? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Engineering » Testing
Bookmark "How to mock object which doesnt implement any interface using EasyMock?" Watch "How to mock object which doesnt implement any interface using EasyMock?" New topic
Author

How to mock object which doesnt implement any interface using EasyMock?

Jatin Vasa
Greenhorn

Joined: Aug 24, 2010
Posts: 4
Hi Friends

Can we mock a class which doesnt implement interface.

Thanks
Jatin Vasa
Jeanne Boyarsky
author & internet detective
Marshal

Joined: May 26, 2003
Posts: 32649
    
216

Jatin,
Welcome to JavaRanch!

You can use the EasyMock class extension to mock objects that don't provide interfaces.


[OCA 8 book] [Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
Jatin Vasa
Greenhorn

Joined: Aug 24, 2010
Posts: 4
Thanks. I used the same....
Thanks again for reply...
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to mock object which doesnt implement any interface using EasyMock?
 
It's not a secret anymore!