title: Unit testing a class that inherits from an abstract class
body: <p>My problem is that I want to stub a property in my abstract class, because my class in test uses that property. I'm currently using latest version of Moq.</p>
  
  <p>My abstract class looks like this:</p>
  
  <pre><code>public abstract class BaseService
  {
      protected IDrawingSystemUow Uow { get; set; }
  }
  </code></pre>
  
  <p>And my class in test looks like this:</p>
  
  <pre><code>public class UserService : BaseService, IUserService
  {
      public bool UserExists(Model model)
      {
          var user = this.Uow.Users.Find(model.Id);
          if(user == null) { return false; }
  
          reurn true;
      }
  }
  </code></pre>
  
  <p>I can't figure out how I can stub the <code>Uow</code> property. Does anybody have any clue? Or is my design that bad that I need to move to <code>Uow</code> property to my class in test?</p>