title: How to initialize Request object in MVC unit tests?
body: <p>I have the following controller method:</p>
  
  <pre><code>public ActionResult Contact()
  {
    HttpPostedFileBase theFile = Reqeust.Files["myfile"];
    ViewBag.Message = "Contact Page";
    return View();
  }
  </code></pre>
  
  <p>In the unit test, I do this:</p>
  
  <pre><code>HomeController controller = new HomeController();
  controller.Contact();
  </code></pre>
  
  <p>Request will be null when Contact() is called.  I've tried a number of different ways to initialize the Request object but nothing is working.  I've tried the HttpContextWrapper() but nothing converts to an HttpRequestBase.  Also, controller.Request is read only so any HttpContext.Current I create doesn't work there.</p>
  
  <p>Any ideas?</p>