title: Integrating FluentValidation validator with base Entity class
body: <p>I want to use <code>AbstractValidator&lt;T&gt;</code> inside base entity class.</p>
  
  <pre><code>[Serializable]
  public abstract class Entity&lt;T&gt; where T : Entity&lt;T&gt;
  {
      public virtual Boolean Validate(AbstractValidator&lt;T&gt; validator)
      {
          return validator.Validate(this as ValidationContext&lt;T&gt;).IsValid;
      }
      // other stuff..
  }
  </code></pre>
  
  <p>But one of my tests fails saying that <code>Validate()</code> method couldn't accept <code>null</code> as a paramter.</p>
  
  <pre><code>[Test]
  public void CategoryDescriptionIsEmpty()
  {
      var category = new Category
      {
          Title = "some title",
          Description = String.Empty
      };
  
      Assert.False(category.Validate(this.validator) == true);
  }
  
  [SetUp]
  public void Setup()
  {
      this.validator = new CategoryValidator();
  }
  </code></pre>
  
  <p>I'm using <code>Visual Web Developer</code> and at the moment can't install <code>C# Developer Express</code> to create console application to debug the error. Since that I don't know how do I debug inside the unit test. Alternatively it would be great if some explanation could be given!</p>
  
  <p>Thanks!</p>