title: How to write test case for below method in controller
body: <p>Need code to write xunit test case for ControllerApi</p>
  
  <p>I tried to inject Contructor from xunit test method, but it asking contructor value which I don't have in test method. </p>
  
  <p>Controller
  ItemApiController.cs</p>
  
  <pre><code>  public class ItemApiController : ControllerBase
    {
           Private ItemClassDataSerices   __ItemClassDataSerices;
           public ItemApiController(IItemClassDataSerices  ItemClassDataSerices)
           {
                __ItemClassDataSerices = ItemClassDataSerices;
           } 
  
           public ActionResult ItemClass([FromQuery] ItemRequest request)
           {
                 return __ItemClassDataSerices.GetData(reqest);            
           }
    }
  </code></pre>
  
  <p>Now how  to write Xunit test method for ItemClass method which is present in ItemApiController.</p>