We could create a special annotation such as @MockLog4j that automatically
suppresses all static and instance fields that uses log4j and injects a
nice mock to them.
Another solution would be to add a mocking policy annotation, e.g.
@MockPolicy where users can pass in a Log4jMockPolicy class which tells
PowerMock to mock the log4j library. It would then be possible to create
custom mock policies as well and they could also be nested.
Original issue reported on code.google.com by johan.ha...@gmail.com on 5 Dec 2008 at 11:04
Original issue reported on code.google.com by
johan.ha...@gmail.com
on 5 Dec 2008 at 11:04