This week's book giveaway is in the HTML/CSS/JavaScript forum.
We're giving away four copies of Practical SVG and have Chris Coyier on-line!
See this thread for details.
Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Help me in mocking static functions with testng powermock and easymock

sumit anand kumar
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
To tell you first, i have tried and tried it again and now i need some help

Heres my code

And heres the log
[Parser] Running: C:\MockWorkspace\Mock\temp-testng-customsuite.xml

got object factory print me Static method called FAILED: testMe java.lang.IllegalStateException: no last call on a mock available at org.easymock.EasyMock.getControlForLastCall( at org.easymock.EasyMock.expect( at staticPkg.TestClass.testMe( ... Removed 22 stack frames

=============================================== staticPkg.TestClass

Tests run: 1, Failures: 1, Skips: 0
=============================================== Mock

Total tests run: 1, Failures: 1, Skips: 0
Help please, i have tried a variety of solutions, can't get it done. Please can anyone try this code and correct it for success? I get error in EasyMock.expect ...............
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!