title: Unit Testing Controller Actions that call IsAjaxRequest()
body: <p>Some of my controller actions need to respond with different ViewResults depending whether or not they were called by an AJAX request. Currently, I'm using the <code>IsAjaxRequest()</code> method to check for this. When this method is called during a unit test, it throws an <code>ArgumentNullException</code> because the HTTP context is missing. </p>
  
  <p>Is there a way to mock/fake this call? Or is this a sign I should be checking for an AJAX request another way?</p>