Timeline for Web job logger implementation
Current License: CC BY-SA 3.0
9 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jul 28, 2015 at 22:42 | comment | added | hocho | Should not ILogger have async methods, and TestJob have ILogger as the third parameter rather than TextWriter? Then you just mock the ILogger passed in. | |
Jul 28, 2015 at 17:45 | comment | added | Dan Lyons |
Rather than using a TextWriter , you may want to look into TraceSource and TextWriterTraceListener.
|
|
Jul 28, 2015 at 17:15 | history | edited | Jamal | CC BY-SA 3.0 |
deleted 6 characters in body; edited tags; edited title
|
Jul 28, 2015 at 12:00 | answer | added | Ben Aaronson | timeline score: 1 | |
Jul 28, 2015 at 11:48 | comment | added | Raskolnikov | I want to write unit test for TestJob method. I can't do that if method is static. Thats why I create non-static methot in web job and I inject everything, including logger in constructor. With this solution I can mock logger in unit test. | |
Jul 28, 2015 at 11:42 | comment | added | Ben Aaronson | "Whole point of this is to mock logger in unit test" Could you explain that a little, please? | |
Jul 28, 2015 at 11:34 | history | edited | Raskolnikov | CC BY-SA 3.0 |
added 53 characters in body
|
Jul 28, 2015 at 11:31 | history | edited | Quill | CC BY-SA 3.0 |
fixed code snippets
|
Jul 28, 2015 at 11:25 | history | asked | Raskolnikov | CC BY-SA 3.0 |