title: Using NSubstitute with a vb.net module
body: <p>We have some existing static methods that are grouped in VB modules.</p>
  
  <p>I want to introduce unit testing to the company, and am looking into using NUnit and NSubstitute. </p>
  
  <p>I can't seem to create a Substitute for the VB module I want to test, or find any examples of how to do this. I am trying to do something like:</p>
  
  <pre><code>Dim Sub = Substitute.For(MyModule)()
  </code></pre>
  
  <p>but VB tells me 'MyModule is a type and cannot be used as an expression'.</p>
  
  <p>If I try</p>
  
  <pre><code>Dim Sub = Substitute.For(Of MyModule)()
  </code></pre>
  
  <p>VB tells me 'Module 'MyModule' cannot be used as a type'.</p>
  
  <p>Have I got the syntax wrong or am I trying to do something stupid?</p>