noushadali / powermock

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

Stubbing/supressing should have precedence over mocking #307

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
There's a bug in EasyMock that treats methods called in the ctor as mocked even 
though they're not. In these cases it would be good to simply be able to 
suppress the methods called in the ctor. But since mocking has precedence over 
suppressing/stubbing this is not possible. This should be an easy fix in 
MockGateway.

Hudson hudsonMockedInstance = createPartialMock(Hudson.class, new String[]{ 
"getRootDir", "getMe" }, new Object[]{ currentTestDirectory, 
(ServletContext)null }); // Here, the IllegalArgumentException is thrown, 
saying getExtensionList behaviour has not been defined

Original issue reported on code.google.com by johan.ha...@gmail.com on 3 Jan 2011 at 8:43

GoogleCodeExporter commented 9 years ago

Original comment by johan.ha...@gmail.com on 10 Apr 2011 at 12:52