title: How to test that action uses argument?
body: <p>I am supposed to be using test-driven development but in this particular case, as I am having trouble, I implemented the action method first. It looks like this:</p>
  
  <pre><code>public ViewResult Index(int pageNumber = 1)
  {
      var posts = repository.All();
      var model = new PagedList&lt;Post&gt;(posts, pageNumber, PageSize);
  
      return View(model);
  }
  </code></pre>
  
  <p>Both the repository and the <code>PagedList&lt;&gt;</code> have been tested already. Now I want to <em>verify</em> that when the action is given a page number that the page number is actually considered. </p>
  
  <pre><code>private Mock&lt;IPostsRepository&gt; repository;
  private HomeController controller;
  
  [Test]
  public void Index_Doohickey()
  {
      var actual = controller.Index(2);
  
      // .. How do I test that the controller actually uses the page number here?
  }
  </code></pre>