public void NullUserAgentRendersEmptyString()
        {
            var httpContext = Substitute.For <HttpContextBase>();

            var renderer = new AspNetRequestUserAgent();

            renderer.HttpContextAccessor = new FakeHttpContextAccessor(httpContext);

            string result = renderer.Render(new LogEventInfo());

            Assert.Empty(result);
        }
        public void NotNullUserAgentRendersEmptyString()
        {
            var httpContext = Substitute.For <HttpContextBase>();


#if !NETSTANDARD_1plus
            httpContext.Request.UserAgent.Returns("TEST");
#else
            var headers = new HeaderDict();
            headers.Add("User-Agent", new StringValues("TEST"));
            httpContext.Request.Headers.Returns((callinfo) => headers);
#endif

            var renderer = new AspNetRequestUserAgent();
            renderer.HttpContextAccessor = new FakeHttpContextAccessor(httpContext);

            string result = renderer.Render(new LogEventInfo());

            Assert.Equal(result, "TEST");
        }