public void Command_should_throw_an_exception_when_the_command_is_not_mapped()
        {
            var command = new AggregateRootTargetNotAMappedCommand { Title = "AggregateRootTargetNotAMappedCommand" };

            Action act = () => TheService.Execute(command);
            act.ShouldThrow<ExecutorForCommandNotFoundException>();
        }
Beispiel #2
0
        public void Command_should_throw_an_exception_when_the_command_is_not_mapped()
        {
            var command = new AggregateRootTargetNotAMappedCommand {
                Title = "AggregateRootTargetNotAMappedCommand"
            };

            Action act = () => TheService.Execute(command);

            act.ShouldThrow <ExecutorForCommandNotFoundException>();
        }
        public void Command_should_throw_an_exception_when_the_command_is_not_mapped()
        {
            var command = new AggregateRootTargetNotAMappedCommand {
                Title = "AggregateRootTargetNotAMappedCommand"
            };
            var executor = new TestAttributeMappedCommandExecutor <AggregateRoot>(command);

            Action act = executor.Execute;

            act.ShouldThrow <CommandMappingException>();
        }
        public void Command_should_throw_an_exception_when_the_command_is_not_mapped()
        {
            var command = new AggregateRootTargetNotAMappedCommand { Title = "AggregateRootTargetNotAMappedCommand" };
            var executor = new TestAttributeMappedCommandExecutor<AggregateRoot>(command);

            Action act = executor.Execute;
            act.ShouldThrow<CommandMappingException>();
        }