public void GivenUrlEmpty_ShouldNOTLog_Test()
        {
            LogManager.Shutdown();
            ILog logger = LoggerFactory.CreateLoggerWithJsonHttpAppender(GetType(), url: "");

            using (var server = new TestHttpServer())
            {
                server.Start(ConfigurationManager.AppSettings["httpListenerUrl"], 500);
                var task = server.WaitForRequestAsync();

                logger.Error("Failure!!!");

                var result = task.Wait(500);
                result.Should().BeFalse("HTTP request was not expected");
            }
        }
        public void GivenValidConfig_ShouldLog_Test()
        {
            XmlConfigurator.Configure();
            var logger = LogManager.GetLogger(this.GetType());

            using (var server = new TestHttpServer())
            {
                server.Start(ConfigurationManager.AppSettings["httpListenerUrl"]);
                var task = server.WaitForRequestAsync();

                logger.Error("Failure!!!");

                var result = task.Wait(500);
                result.Should().BeTrue("we expect to receive a HTTP request");

                string requestBody = server.GetRequestBody(task.Result);
                server.SendResponse(task.Result, 200);

                var obj = JsonConvert.DeserializeObject(requestBody);
            }
        }