public void Command_decorated_with_Transactional_attribute_mapped_to_methodOrCreator_should_be_executed_in_context_of_transaction()
        {
            bool executedInTransaction = false;
            var instance = new AggregateRootTarget("TitleSetInConstructor");
            var command = new TransactionalAggregateRootTargetCreateOrUpdateTitleCommand { Title = "TransactionalAggregateRootTargetUpdateTitleCommand" };
            var executor = new TestAttributeMappedCommandExecutor<AggregateRootTarget>(command, instance);
            executor.VerificationAction = () => executedInTransaction = Transaction.Current != null;

            executor.Execute();

            Assert.True(executedInTransaction);
        }
        public void Command_decorated_with_Transactional_attribute_mapped_to_methodOrCreator_should_be_executed_in_context_of_transaction()
        {
            bool executedInTransaction = false;
            var  instance = new AggregateRootTarget("TitleSetInConstructor");
            var  command  = new TransactionalAggregateRootTargetCreateOrUpdateTitleCommand {
                Title = "TransactionalAggregateRootTargetUpdateTitleCommand"
            };
            var executor = new TestAttributeMappedCommandExecutor <AggregateRootTarget>(command, instance);

            executor.VerificationAction = () => executedInTransaction = Transaction.Current != null;

            executor.Execute();

            Assert.IsTrue(executedInTransaction);
        }