Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Source code misaligned when partial mocking private methods using JMockit  RSS feed

 
Salil Surendran
Ranch Hand
Posts: 45
  • 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
Boost this thread!