title: Moq - Non-overridable members may not be used in setup / verification expressions
body: <p>I'm new to Moq. I'm mocking a <code>PagingOptions</code> class. Here is how the class looks like:</p>
  
  <pre><code>public class PagingOptions
      {
          [Range(1, 99999, ErrorMessage = "Offset must be greater than 0.")]
          public int? Offset { get; set; }
  
          [Range(1, 100, ErrorMessage = "Limit must be greater than 0 and less than 100.")]
          public int? Limit { get; set; }
  
          public PagingOptions Replace(PagingOptions newer)
          {
              return new PagingOptions
              {
                  Offset = newer.Offset ?? Offset,
                  Limit = newer.Limit ?? Limit
              };
          }
      }
  </code></pre>
  
  <p>Here is my mock version of the class,</p>
  
  <pre><code>var mockPagingOptions = new Mock&lt;PagingOptions&gt;();
              mockPagingOptions.Setup(po =&gt; po.Limit).Returns(25);
              mockPagingOptions.Setup(po =&gt; po.Offset).Returns(0);
  </code></pre>
  
  <p>I get the below error when setting up the property values. Am I making something wrong. Looks like I cannot Moq concrete class? Only Interfaces can be Mocked?  Please assist.</p>
  
  <p><a href="https://i.stack.imgur.com/4mWA7.png" rel="noreferrer"><img src="https://i.stack.imgur.com/4mWA7.png" alt="moq error"></a></p>
  
  <p>Thanks,
  Abdul</p>