title: How to reach int variable that inside my controller method when i write unit test with xUnit
body: <p>I am trying to write unit test for my controller. I am using xUnit to test my methots. </p>
  
  <p>I can reach "changePasswordX" method inside my controller to test but i can not reach to my userId variable and claim value to check are they equal or not ?</p>
  
  <p>How can i test this code in xUnit?</p>
  
  <pre><code>    [HttpGet("ChangePassword")]
      public async Task&lt;IActionResult&gt; ChangePassword(int userId, oldPassword, newPassword)
      {      
          if (userId != int.Parse(User.FindFirst(ClaimTypes.NameIdentifier).Value))
              return Unauthorized();
  
           _repo.changePasswordX(userId, oldPassword, newPassword);
  
          return Ok();
      }
  </code></pre>