File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Mocking out the parent class method using Easymock

 
ragi singh
Ranch Hand
Posts: 198
Oracle Suse
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi ,

I am writing a test case using easy mock but the method i want to test gives a call to the super class method which is also overridden in my subclass . I thought about to approaches one taking out the call to super class method in another method and then mocking this method other being partial mocking . Can anyone suggest whether the approach is correct or is there a way out which is better or there is already something existing in the api to deal with such scenario .


Thanks ,
ragi
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 33694
316
Eclipse IDE Java VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ragi,
I think your refactoring is the best choice.
 
Consider Paul's rocket mass heater.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic