title: How do I provide ILogger<T> in my unit tests of .NET Core code?
body: <p>Given a class with a constructor signature of</p>
  
  <pre><code>public Foo(ILogger&lt;Foo&gt; logger) {
      // ...
  }
  </code></pre>
  
  <p>that I want to test, I need some way to provide an <code>ILogger&lt;Foo&gt;</code> in the test. It's <a href="https://stackoverflow.com/questions/43424095">been asked before</a>, but <a href="https://stackoverflow.com/a/43425633/38055">the only answer then</a> was to set up a full-blown service registry, configure logging and resolve the logger from there. This seems very overkill to me.</p>
  
  <p>Is there a simple way to provide an implementation of <code>ILogger&lt;T&gt;</code> for testing purposes?</p>
  
  <p>Note: it doesn't have to actually log anything - just not blow up when the subject under test tries to log something.</p>