tag:robotlegs.tenderapp.com,2009-10-18:/discussions/questions/1078-logger-and-unit-testRobotlegs: Discussion 2012-09-25T07:57:00Ztag:robotlegs.tenderapp.com,2009-10-18:Comment/189412622012-09-22T10:37:44Z2012-09-22T10:38:30ZLogger and unit test<div><p>What version of RL are you using?<br>
what are you trying to test? the Logger or the class into which it
is injected.</p></div>neiltag:robotlegs.tenderapp.com,2009-10-18:Comment/189412622012-09-22T10:46:36Z2012-09-25T07:57:00ZLogger and unit test<div><p>I'm using RL2 latest. I'm trying to test my class which has
logger instance injected.</p></div>Vj3k0tag:robotlegs.tenderapp.com,2009-10-18:Comment/189412622012-09-22T11:01:52Z2012-09-22T11:01:52ZLogger and unit test<div><p>Unless you are wanting to test the logging itself, the best
thing to do would be to inject a stub - just a blank implementation
of ILogger with methods that do nothing.</p></div>Shaun Smithtag:robotlegs.tenderapp.com,2009-10-18:Comment/189412622012-09-22T17:10:51Z2012-09-25T07:57:00ZLogger and unit test<div><p>Stubbed it in the end.</p>
<p>Thanks, regards,<br>
Vjeko</p></div>Vj3k0