title: Mock Concrete FileInfo Object
body: <p>I would like to Mock the System.IO.FileInfo.Extension Method and have it return ".xls" but I can't get anything to work </p>
  
  <p><a href="http://www.telerik.com/help/justmock/advanced-usage-mscorlib-mocking.html#MockingFileInfo" rel="nofollow">This Example</a> works great for Delete but not for Extension (The code will not compile)</p>
  
  <pre><code>  [ClassInitialize]
        public static void Initialize(TestContext context)
        {
           Mock.Partial&lt;FileInfo&gt;().For((x) =&gt; x.Extension);
        }
  </code></pre>
  
  <p>I Have also tried using this <a href="http://www.telerik.com/help/justmock/advanced-usage-concrete-mocking.html" rel="nofollow">example</a> but the code is wrong.</p>
  
  <ul>
  <li>I have a fully licensed  copy of JustMock </li>
  <li>I am using VS 2010 .net 4.0</li>
  </ul>
  
  <p>Edit: 
  I know I can setup a interface and test that way, but the paid version JustMock is supposed to mock concrete classes. Since I paid for it, I would like to know how to do it that way.</p>