private void ValidateConfiguration()
        {
            var exceptions = new List<Exception>();

            if (Logger == null)
                Logger = new NullLogger();

            if (Serializer == null)
                exceptions.Add(new InvalidConfigurationException("A serializer must be set!"));

            if (Compressor == null)
                Compressor = new NullCompressor();

            if (CommandPipeline == null && EventPipeline == null && RequestResponsePipeline == null)
                exceptions.Add(new InvalidConfigurationException("No pipelines are configured! One or more of the following are needed: CommandPipeline, EventPipeline and RequestResponsePipeline"));

            if (CommandPipeline == null)
                CommandPipeline = new CommandPipelineConfiguration();

            if (EventPipeline == null)
                EventPipeline = new EventPipelineConfiguration();

            if (RequestResponsePipeline != null)
                RequestResponsePipeline = new RequestResponsePipelineConfiguration();

            if (exceptions.Any())
                throw new AggregateException(exceptions);
        }
        /// <summary>
        ///     Used when configuring a CommandPipeline to be used with Cumulus
        /// </summary>
        /// <param name="configuration"></param>
        /// <param name="configure"></param>
        /// <returns></returns>
        public static Config WithCommandPipeline(this Config configuration, Action<CommandPipelineConfiguration> configure = null)
        {
            var config = new CommandPipelineConfiguration();

            configure?.Invoke(config);

            configuration.CommandPipeline = config;

            return configuration;
        }
 public CommandPipelineConfigurationTests()
 {
     _config = new CommandPipelineConfiguration();
 }