title: How to use Moq to Mock an index property with that has two indexes
body: <p>This question clearly shows how you can mock an index property with MOQ: <a href="https://stackoverflow.com/questions/2372938/how-to-moq-setting-an-indexed-property">How to Moq Setting an Indexed property</a></p>
  
  <p>However, what if you have two index?</p>
  
  <p>For instance, let's say you have a _Worksheet object (from vsto)</p>
  
  <pre><code>        var mockWorksheet = new Mock&lt;_Worksheet&gt;();
  </code></pre>
  
  <p>You want to create a property called Cells, such that you can use it like so:</p>
  
  <pre><code>        var range = worksheet.Cells[1,1];
  </code></pre>
  
  <p>Note:
  The range can be another mock, which could be mocked with:
              var mockRange = new Mock();</p>
  
  <p>Any suggestions?</p>