title: Unit Testing ViewResult in Asp.NET MVC
body: <p>Even though there are couple of Posts on StackOverflow about Unit Testing Action Result in MVC, I have a specific Question ....</p>
  
  <p>Here is my ActionResult in Controller:</p>
  
  <pre><code>public ActionResult Index()
  {
      return View(db.Products.ToList());
  }
  </code></pre>
  
  <p>Every Item in Products has different attributes like Name,Photo,Quantity etc..
  I wrote a testmethod for this method .It looks as follows :</p>
  
  <pre><code>private CartEntity db = new CartEntity();
  
  [TestMethod]
  public void Test_Index()
  {
      //Arrange
      ProductsController prodController = new ProductsController();
  
      ViewResult = prodController.Index();
  
  
  }
  </code></pre>
  
  <p>What Should I compare in this case since there are no parameters are being passed into Index Action</p>