tiebin-zhang / powermock

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

Port Log4JMockPolicy to Mockito API #389

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. NA
What is the expected output? What do you see instead?
NA
What version of the product are you using? On what operating system?
1.4.12. Win7x64.
Please provide any additional information below.

I'd like to see the Log4JMockPolicy ported over to the Mockito API (from 
EasyMock). If I have time I'll attach a patch to this issue.

Original issue reported on code.google.com by matthew....@gmail.com on 6 Jun 2012 at 3:27

GoogleCodeExporter commented 9 years ago
Attached a starting point. It's mostly a copy of the Slf4jMockPolicy in the 
same package. I haven't tested yet (hence being a starting point).

Original comment by matthew....@gmail.com on 6 Jun 2012 at 5:31

Attachments:

GoogleCodeExporter commented 9 years ago
Added the following method so I could set expectations on the mocked Logger 
instance:

    public static ThreadLocal<Object> getThreadLogger() {
        return threadLogger;
    }

Original comment by matthew....@gmail.com on 6 Jun 2012 at 5:54

GoogleCodeExporter commented 9 years ago
Updated source file. Use the mock loader for everything under org.apache.log4j.*

Original comment by matthew....@gmail.com on 7 Jun 2012 at 1:19

Attachments:

GoogleCodeExporter commented 9 years ago
Great, I'll add it to source code once I get back from vacation.

Original comment by johan.ha...@gmail.com on 13 Jul 2012 at 7:09

GoogleCodeExporter commented 9 years ago

Original comment by johan.ha...@gmail.com on 28 May 2014 at 12:50