title: How to use IMapper in Xunit test for Service method
body: <p>I tried to create for mapper moq object but it is not working can anyone help on the how to access the mapping solution while run the test case in service method. I tried below code</p>
  <pre><code>private Mock&lt;IMapper&gt; _mapper = new Mock&lt;IMapper&gt;();
  </code></pre>
  <p>I pass the service dependency injection</p>
  <pre><code>_abcService = new AbcService(_mapper.Object);
  
  
  System.NullReferenceException: 'Object reference not set to an instance of an object.'
  </code></pre>
  <p>getting this error</p>