title: Mock CancellationTokenSource in c#
body: <p>I have a method which cancels the <code>CancellationTokenSource</code> after a specific amount of time</p>
  
  <pre><code>public void Reset( CancellationTokenSource source, int ms) 
  {
     source.cancelAfter(ms);
  }
  </code></pre>
  
  <p>I have the following code which calls reset</p>
  
  <pre><code>public void method1(source, ms) 
  {
     Reset(source, 10);
     Reset(source, 10);
     Reset(source, 10);
     Reset(source, 20);
     Reset(source, 20);
  }
  </code></pre>
  
  <p>I am writing some unit tests for my code and need to check that <code>cancelAfter</code> method is called 5 times ( 3 times with 10 and 2 times with 20)</p>
  
  <p>Unfortunately, I am unable to create a Moq class for <code>CancellationTokenSource</code> and I also cannot create a new interface for it. </p>