Win a copy of Learn Spring Security (video course) this week in the Spring 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
  • 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: 34071
331
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ragi,
I think your refactoring is the best choice.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic