public void When_command_validator_is_IValidationrule_of_the_correct_generic_type_then_no_exception_is_thrown()
        {
            var command = new CommandWithCommandValidator(Validate.That <CommandWithCommandValidator>(s => true));

            command.Invoking(c => c.ApplyTo(new FakeAggregateWithEnactCommandConvention()))
            .ShouldNotThrow();
        }
        public void Custom_CommandValidator_rules_are_not_cached()
        {
            var command1 = new CommandWithCommandValidator(Validate.That <CommandWithCommandValidator>(t => true));
            var command2 = new CommandWithCommandValidator(Validate.That <CommandWithCommandValidator>(t => true));

            command1.CommandValidator.Should().NotBeSameAs(command2.CommandValidator);
        }
Exemplo n.º 3
0
 public void EnactCommand(CommandWithCommandValidator command)
 {
 }