title: How to write Unit test for Controller method with two parameters and what scenarios are required to test?
body: <p>I am new in Unit testing.  I would like to write unit tests for the Delete controller action. I want to use NSubstitute to mock all the dependencies. The current implementation is using an interface IRepository to abstract out calls to the underlying data source.</p>
  
  <p>Controller</p>
  
  <pre class="lang-cs prettyprint-override"><code>public ActionResult Delete(string fileName, bool isPublic)
  {
      try
      {
          repo.DeleteDocument(new PortalDocument
          {
              Path = fileName,
              IsPublic = isPublic
          });
      }
      catch (Exception e)
      {
          EventLog.Logger.LogCritical(e, e.Message);            
      }
      return RedirectToAction(IndexViewName);
  }
  </code></pre>
  
  <p>Interface for repository.</p>
  
  <pre class="lang-cs prettyprint-override"><code>public interface IRepository&lt;out T&gt; where T: 
      CloudBlobContainer
  {
      bool DeleteDocument(PortalDocument document);
  }
  </code></pre>
  
  <p>PortalDocument Class</p>
  
  <pre class="lang-cs prettyprint-override"><code>public class PortalDocument
  {
      public bool IsPublic { get; set; }
  }
  </code></pre>
  
  <p>Thanks in advance.</p>