title: Mocking ChildProperty cannot get it to work?
body: <p>I am trying to test a property that is nested in a child class.
  I always get an error.
  Am I missing something?
  Is it possible to test a child property in moq.</p>
  
  <p>I have the following </p>
  
  <pre><code>     [Test]
  public void Should_be_able_to_test_orderCollection()
      {
          var orderViewMock = new Mock&lt;IOrderView&gt;();
          orderViewMock.SetupGet(o =&gt; o.Customer.OrderDataCollection.Count).Returns(2);          
  
          orderViewMock.SetupSet(o =&gt; o.Customer.OrderDataCollection[1].OrderId = 1);
  
          orderViewMock.VerifySet(o =&gt; o.Customer.OrderDataCollection[1].OrderId=1);
      }
  
      public class CustomerTestHelper
      {
          public static CustomerInfo GetCustomer()
          {
              return new CustomerInfo
             {
                 OrderDataCollection = new OrderCollection
                   {
                       new Order {OrderId = 1},
                       new Order {OrderId = 2}
                   }
             };
  
          }
      }
      public class CustomerInfo
      {
          public OrderCollection OrderDataCollection { get; set; }
      }
  
      public class OrderCollection:List&lt;Order&gt;
      {
      }
  
      public class Order
      {
          public int OrderId { get; set; }
      }
      public interface  IOrderView
      {
          CustomerInfo Customer { get; set; }
      }
  </code></pre>