title: How to unit test service configuration with NUnit?
body: <p>I have the following in my Startup.cs file and want to know if there's any way to unit test using NUnit? </p>
  
  <pre><code>public void ConfigureServices(IServiceCollection services)
  {
          services.TryAddSingleton&lt;IUserValidator, UserValidator&gt;();
          services.TryAddSingleton&lt;IPolicyValidator, PolicyValidator&gt;();
          services.TryAddSingleton&lt;IAccountValidator, AccountValidator&gt;();
  }
  </code></pre>
  
  <p>As a result of no test coverage this file is failing Sonar Cloud code quality gates because it's untested but I am not sure how to go about unit testing this? </p>