Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Source code misaligned when partial mocking private methods using JMockit

 
Salil Surendran
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Friends,
I have a class that I am partially mocking using NonStrictExpectations



The problem is that when I use Deencapsulation.invoke() to mock a private method it messes up the source code of the CampaignSelector class and hence when I debug into the getMessageFromCampaign() method the source code is misaligned in Eclipse. I understand that JMockit redefines classes but this only happens when private methods are mocked and not public. Any way to get around this problem?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic