public void execute_should_swallow_exceptions()
        {
            // given
            string markup      = "item1 item2";
            var    builder     = new TextMiddlewareBuilder(_logger);
            var    middleware1 = new MiddleWareMock()
            {
                SearchString = null, Replacement = null
            };

            builder.Use(middleware1);

            // when
            string result = builder.Execute(markup);

            // then
            Assert.Equal("item1 item2", result);
        }
        public void use_should_add_middleware_and_execute_should_concatenate_values_from_middleware()
        {
            // given
            string markup      = "item1 item2";
            var    builder     = new TextMiddlewareBuilder(_logger);
            var    middleware1 = new MiddleWareMock()
            {
                SearchString = "item1", Replacement = "value1"
            };
            var middleware2 = new MiddleWareMock()
            {
                SearchString = "item2", Replacement = "value2"
            };

            builder.Use(middleware1);
            builder.Use(middleware2);

            // when
            string result = builder.Execute(markup);

            // then
            Assert.Equal("value1 value2", result);
        }