public static UnitTestContext Create(int bufferSize = BufferSize, bool? failSend = null, bool? failClose = null)
        {
            var repository = new RepositoryStub();
            var errorHandler = new ErrorHandlerStub();

            var appender = new TestableAppender(repository)
                {
                    Lossy = false,
                    BufferSize = bufferSize, 
                    ConnectionString = ConnectionString, 
                    ErrorHandler = errorHandler, 
                    FailSend = failSend, 
                    FailClose = failClose
                };

            appender.ActivateOptions();

            return new UnitTestContext
                {
                    Repository = repository,
                    ErrorHandler = errorHandler,
                    Appender = appender
                };
        }
        public static UnitTestContext Create(int bufferSize = BufferSize, bool?failSend = null, bool?failClose = null)
        {
            var repository   = new RepositoryStub();
            var errorHandler = new ErrorHandlerStub();

            var appender = new TestableAppender(repository)
            {
                Lossy            = false,
                BufferSize       = bufferSize,
                ConnectionString = ConnectionString,
                ErrorHandler     = errorHandler,
                FailSend         = failSend,
                FailClose        = failClose
            };

            appender.ActivateOptions();

            return(new UnitTestContext
            {
                Repository = repository,
                ErrorHandler = errorHandler,
                Appender = appender
            });
        }