title: Can't create component as it has dependencies to be satisfied in ASP.NET Boilerplate
body: <p>I am getting an error while running a test. How do I solve this?</p>
  
  <pre><code>public class TestAppService : TestAppServiceBase, ITestAppService
  {
      private readonly ITestRepository _testRepository;
      public TestAppService(ITestRepository testRepository)
      {
          _testRepository = testRepository;
      }
  }
  
  public class TestAppService_Test : TestAppServiceTestBase
  {
      private readonly ITestAppService _testAppService;
      public TestAppService_Test()
      {
          _testAppService = Resolve&lt;ITestAppService&gt;();
      }
  }
  </code></pre>
  
  <p>The repository:</p>
  
  <pre><code>public class TestRepository : TestRepositoryBase&lt;Test, int&gt;, ITestRepository
  {
      private readonly IActiveTransactionProvider _transactionProvider;
      public TestRepository(IDbContextProvider&lt;TestDbContext&gt; dbContextProvider)
          : base(dbContextProvider)
      {
      }
  
      public TestRepository(IDbContextProvider&lt;TestDbContext&gt; dbContextProvider,
          IActiveTransactionProvider transactionProvider, IObjectMapper objectMapper)
      : base(dbContextProvider)
      {
          _transactionProvider = transactionProvider;
          ObjectMapper = objectMapper;
      }
  }
  
  public interface ITestRepository : IRepository&lt;Test, int&gt;
  {
  }
  
  public class TestRepositoryBase&lt;TEntity, TPrimaryKey&gt; : EfCoreRepositoryBase&lt;TestDbContext, TEntity, TPrimaryKey&gt;
      where TEntity : class, IEntity&lt;TPrimaryKey&gt;
  {
      public IObjectMapper ObjectMapper;
      public TestRepositoryBase(IDbContextProvider&lt;TestDbContext&gt; dbContextProvider)
          : base(dbContextProvider)
      {
      }
  }
  
  /// &lt;summary&gt;
  /// Base class for custom repositories of the application.
  /// This is a shortcut of &lt;see cref="TestRepositoryBase{TEntity,TPrimaryKey}"/&gt; for &lt;see cref="int"/&gt; primary key.
  /// &lt;/summary&gt;
  /// &lt;typeparam name="TEntity"&gt;Entity type&lt;/typeparam&gt;
  public class TestRepositoryBase&lt;TEntity&gt; : TestRepositoryBase&lt;TEntity, int&gt;
      where TEntity : class, IEntity&lt;int&gt;
  {
      public TestRepositoryBase(IDbContextProvider&lt;TestDbContext&gt; dbContextProvider)
          : base(dbContextProvider)
      {
      }
  }
  </code></pre>
  
  <p>The error:</p>
  
  <pre><code>Test Name:
  
  ABC.XYZ.Tests.PQR.TestAppService_Test.Should_Create_Test_With_Valid_Arguments
  Test FullName:  ABC.XYZ.Tests.PQR.TestAppService_Test.Should_Create_Test_With_Valid_Arguments (20f54c54e5d9f077f4cb38b988ecb8e63e07d190)
  Test Source:    C:\Users\viveknuna\source\repos\XYZ\aspnet-core\test\ABC.XYZ.Tests\PQR\TestAppService_test.cs : line 25
  Test Outcome:   Failed
  Test Duration:  0:00:00.001
  
  Result StackTrace:
  at Castle.MicroKernel.Handlers.DefaultHandler.AssertNotWaitingForDependency()
     at Castle.MicroKernel.Handlers.DefaultHandler.ResolveCore(CreationContext context, Boolean requiresDecommission, Boolean instanceRequired, Burden&amp; burden)
     at Castle.MicroKernel.Handlers.DefaultHandler.Resolve(CreationContext context, Boolean instanceRequired)
     at Castle.MicroKernel.DefaultKernel.ResolveComponent(IHandler handler, Type service, IDictionary additionalArguments, IReleasePolicy policy)
     at Castle.MicroKernel.DefaultKernel.Castle.MicroKernel.IKernelInternal.Resolve(Type service, IDictionary arguments, IReleasePolicy policy)
     at Castle.Windsor.WindsorContainer.Resolve[T]()
     at ABC.XYZ.Tests.PQR.TestAppServiceTestBase..ctor() in C:\Users\viveknuna\source\repos\XYZ\aspnet-core\test\ABC.XYZ.Tests\PQR\TestAppServiceTestBase.cs:line 14
     at ABC.XYZ.Tests.PQR.TestAppService_Test..ctor() in C:\Users\viveknuna\source\repos\XYZ\aspnet-core\test\ABC.XYZ.Tests\PQR\TestAppService_test.cs:line 17
  Result Message:
  Castle.MicroKernel.Handlers.HandlerException : Can't create component 'ABC.XYZ.Business.Services.PQR.TestAppService' as it has dependencies to be satisfied.
  
  'ABC.XYZ.Business.Services.PQR.TestAppService' is waiting for the following dependencies:
  - Service 'ABC.XYZ.Business.Repositories.Interfaces.ITestRepository' which was not registered.
  </code></pre>