My favorites | Sign in
Project Home Downloads Wiki Issues Source
New issue   Search
for
  Advanced search   Search tips   Subscriptions
Issue 310: MockStaticTest.testMockStatic failing with IllegalStateException: no last call on a mock available
4 people starred this issue and may be notified of changes. Back to list
Status:  New
Owner:  ----


Sign in to add a comment
 
Reported by satya1...@gmail.com, Jan 26, 2011
What steps will reproduce the problem?
1.downloaded powermock-easymock-junit-1.4.7.zip
2. download the files StaticService.class, StaticHelper.class
3.Run the test class MockStaticTest
4. test case fails with
java.lang.IllegalStateException: no last call on a mock available
	at org.easymock.EasyMock.getControlForLastCall(EasyMock.java:521)
	at org.easymock.EasyMock.expect(EasyMock.java:499)
	at com.westgroup.novus.migratescheduler.MockStaticTest.testMockStatic(MockStaticTest.java:44)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)


What version of the product are you using? On what operating system?
powermock-easymock-junit-1.4.7.zip on windows xp

Please provide any additional information below.
I am trying ot use powermock to mock the static class, i wanted to take help from working example from MockStaticTest. 
Feb 9, 2011
Project Member #1 johan.ha...@gmail.com
This is usually a user error. "MockStaticTest" is executed on every PowerMock release so it should work. Please provide a running example if you think there's a problem.

Thanks
Apr 7, 2011
#2 sesam...@googlemail.com
I think that this issue is related to Issue 309
Sign in to add a comment

Powered by Google Project Hosting