simple testing ViewResult and mocking Model used in controller
<p>Inside controller I have view which returns simple object to the view. </p>

<pre><code>public ActionResult SomeAction(int?id)
{
   MyModel model = new MyModel();
   return View(model);
}
</code></pre>

<blockquote>
  <p>how can I unit test this controller in order to check ViewResult,
  basically to </p>
  
  <p>check if view is initialized? Basically how can I mock this MyModel
  inside my unit test?</p>
</blockquote>

<pre><code>    [Test]
    public void Can_Open_SomeAction()
    {
        // controller is already set inside `SetUp` unit step.
        ViewResult res = this.controller.SomeAction() as ViewResult;
        Assert.IsNotNull(res);
    }
</code></pre>

<p>Update:</p>

<pre><code> public ActionResult SomeAction(int?id)
 {
      MyModel model = new MyModel();
      this.PopulatePageCombos(id);
      return View(model);
 }
</code></pre>