title: NSubstitute cannot setup return value (CouldNotSetReturnException)
body: <p>I have an interface (called <code>IRepository</code>) that has a method on it like this:</p>
  
  <pre><code>IEnumerable&lt;TEntity&gt; ExecuteStoredProcedure&lt;TEntity&gt;(string functionName, 
                                        params Tuple&lt;string, object&gt;[] parameters);
  </code></pre>
  
  <p>I am trying to set what that method will return when it is called via my unit test.  Like this:</p>
  
  <pre><code>dataAccess = Substitute.For&lt;IRepository&gt;();
  dataAccess.ExecuteStoredProcedure&lt;MyCustomReturnType&gt;(null, null)
            .ReturnsForAnyArgs(MyCustomReturnList);
  </code></pre>
  
  <p>When I run the test I get this exception:</p>
  
  <blockquote>
    <p>NSubstitute.Exceptions.CouldNotSetReturnException: Could not find a call to return from.</p>
  </blockquote>
  
  <p>The message goes on to caution about trying to do this with actual classes, but that does not apply to me.</p>
  
  <p>I tried changing my <code>null</code> params to be something more real:</p>
  
  <pre><code>ExecuteStoredProcedure&lt;MyCustomReturnType&gt;("", new Tuple&lt;string, object&gt;[]{null})
  </code></pre>
  
  <p>But that did not help...</p>
  
  <p><strong>Any ideas what I am doing wrong with this substitute?</strong></p>
  
  <p>(My guess is that it has something to do with the <code>params</code> keyword.)</p>