title: Setting property Row to Mocked Microsoft.Office.Interop.Excel.Range with Mock
body: <p>I want to mock the Microsoft.Office.Interop.Excel.Range and after to be able to get property Row (index of first Row of Range). Moq v 4.1.1309.1617 / nunit.framework v 2.6.3.13283
  In my unit test, I attempt to set up the behavior of the mock as follows:</p>
  
  <pre><code>var moqRowSelected = new Mock&lt;Range&gt;();
  const int row = 1;
  moqRowSelected.SetupGet(x =&gt; x.Row).Returns(row);
  moqSheetBase.SetupProperty(x =&gt; x.RowSelected, moqRowSelected.Object);
  </code></pre>
  
  <p>In the code being unit tested, I'm using the Range as follows:</p>
  
  <pre><code>var iRow = PlanningSheet.RowSelected.Row;
  Range row = sheet.Rows[iRow];
  </code></pre>
  
  <p>When the test runs, it produces the following exception:</p>
  
  <blockquote>
    <p>Error: Missing method 'instance int32
    [My.Example.Implementation.MyClass]
    Microsoft.Office.Interop.Excel.Range::get_Row()' from class
    'Castle.Proxies.RangeProxy'.</p>
  </blockquote>
  
  <p>How can I implement this mocking successfully? Can any one help me, Thanks.</p>