public void TestQueryNull()
 {
     var query = new QueryA();
     var self = new QueryAndType(query);
     var result = QueryValidationSteps.FindValidator(
         self,
         t =>
         {
             t.ShouldBe(self.Type);
             return null;
         });
     result.ValidatorType.ShouldBe(null);
     result.Query.ShouldBe(query);
 }
 public void TestQuery()
 {
     var query = new QueryA();
     var self = new QueryAndType(query);
     var result = QueryValidationSteps.FindValidator(
         self,
         t =>
         {
             t.ShouldBe(self.Type);
             return typeof(TestValidator<QueryA>);
         });
     result.ValidatorType.ShouldBe(typeof(TestValidator<QueryA>));
     result.Query.ShouldBe(query);
 }
 public static QueryAndValidatorType FindValidator(QueryAndType self, Func<Type, Type> findValidatorType)
 {
     return new QueryAndValidatorType(self.Query, findValidatorType(self.Type));
 }