This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes Testing and the fly likes Static method partial mocking. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Engineering » Testing
Bookmark "Static method partial mocking." Watch "Static method partial mocking." New topic
Author

Static method partial mocking.

pawan chopra
Ranch Hand

Joined: Jan 23, 2008
Posts: 415

We are using PowerMock for unit testing. I could not find partial mocking for static methods. I have seen this http://code.google.com/p/powermock/wiki/MockitoUsage which says that PowerMock contains a method called mockStaticPartials but I couldn't find this method. Can you help me to mock a specific method of static class?


Pawan Chopra
SCJP - DuMmIeS mInD
Marcin Kwiatkowski
Ranch Hand

Joined: Aug 06, 2007
Posts: 32

PowerMock is an extension for either EasyMock or Mockito. Are you sure you're using Mockito version?
 
Have you checked out Aspose?
 
subject: Static method partial mocking.
 
It's not a secret anymore!