tiebin-zhang / powermock

Automatically exported from code.google.com/p/powermock
Apache License 2.0
0 stars 0 forks source link

Doesn't work well in Android project #341

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.
2.
3.

What is the expected output? What do you see instead?

when mock a singleton,the mockstatic method throws error says:"commandPool is 
not an interface"

What version of the product are you using? On what operating system?

the latest easymock version,windows 7 64bit 

Please provide any additional information below.

I use AndroidEasyMock.jar on google code at first, but here comes a singleton 
need to be mock, so I add PowerMock to my test project. Android integrated 
JUnit3, so I write the test as the example in your source of JUnit3, but red 
bar comes out when runing the mockStatic(commandPool) method, "commandPool is 
not an interface"

Original issue reported on code.google.com by sendto...@gmail.com on 12 Aug 2011 at 6:37

GoogleCodeExporter commented 9 years ago
I not an Android developer myself but I've just junit4 with android and that 
was no problem. Other people have successfully used PowerMock with Android so 
it should work.

Original comment by johan.ha...@gmail.com on 21 Aug 2011 at 9:30

GoogleCodeExporter commented 9 years ago
No response from user, closing issue.

Original comment by johan.ha...@gmail.com on 14 Sep 2011 at 8:47