This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

integrating SpringContextTests with PowerMock

 
Max Ulanovskiy
Greenhorn
Posts: 3
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
faced the problem while integrating PowerMock and Spring dependency injection for test cases. For example, we have a field in test which is autowired like this:

mock is a bean configured in tests-context.xml

Next I want to use some tricks of PowerMock for my mock object. To do this I should apply annotations
to MyTest class, but when I do this I'm getting NPE when I call mock. I suppose that PowerMockRunner.class and AbstractJUnit4SpringContextTests are in conflicted state...
Is there any standard way to solve this problem?
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic