public void TestCommandNull()
 {
     var command = new CommandA();
     var self = new CommandAndType(command);
     var result = CommandValidationSteps.FindValidator(
         self,
         t =>
         {
             t.ShouldBe(self.Type);
             return null;
         });
     result.ValidatorType.ShouldBe(null);
     result.Command.ShouldBe(command);
 }
 public void TestCommand()
 {
     var command = new CommandA();
     var self = new CommandAndType(command);
     var result = CommandValidationSteps.FindValidator(
         self,
         t =>
         {
             t.ShouldBe(self.Type);
             return typeof(TestValidator<CommandA>);
         });
     result.ValidatorType.ShouldBe(typeof(TestValidator<CommandA>));
     result.Command.ShouldBe(command);
 }
 public static CommandAndValidatorType FindValidator(CommandAndType self, Func<Type, Type> findValidatorType)
 {
     return new CommandAndValidatorType(self.Command, findValidatorType(self.Type));
 }