title: NSubstitute use real instance of a class as substitute, except one method
body: <p>Is there any built-in way in NSubstitute for mocking a class with its instance except for few methods?</p>
  
  <p>In example I want to preserve the whole functionality of the instance, but check if a method gets called with particular parameters.</p>
  
  <p>To do that actually I do</p>
  
  <pre><code>public class Wrapper: IInterface
  {
      public IInterface real;
      public IInterface sub;
  
      public void Wrapper(IIterface realInstance, IIterface nsubstitute)
      {
          real = realInstance;
          sub = nsubstitute;
      }
  
      public void MethodThatShouldWorkAsAlways()
      {
          real.MethodThatShouldWorkAsAlways();
      }
  
      public intMethodToBeTested(int a)
      {
          return sub.MethodToBeTested();
      }
  }
  </code></pre>
  
  <p>The reason for that is that I'm testing stuff complex enough that I can't simply create wrappers manually, that's time consuming and error-prone. It would be nice if Nsubstitute allows for something like:</p>
  
  <pre><code>IIterface realMock = NSubstitute.Mock&lt; IIterface&gt;( new RealClass());
  
  realMock.MethodThatShouldWorkAsAlways(); // regular logic
  realMock.MethodToBeTested(4).Returns( 3); // overrides the method to always returns 3
  </code></pre>
  
  <p>but I did not find any documentation for doing that so far.</p>