File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Source code misaligned when partial mocking private methods using JMockit

Salil Surendran
Ranch Hand
Posts: 40
  • 0
  • 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?
I agree. Here's the link:
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic