public void Should_return_accept_types(string expectedAcceptTypes)
        {
            // Arrange
            var worker = new FakeWorkerRequest {AcceptTypes = expectedAcceptTypes};

            // Act
            var acceptTypes = worker.GetKnownRequestHeader(HttpWorkerRequest.HeaderAccept);

            // Assert
            acceptTypes.Should().Be(expectedAcceptTypes);
        }
        public void Should_return_accept_types(string expectedAcceptTypes)
        {
            // Arrange
            var worker = new FakeWorkerRequest {
                AcceptTypes = expectedAcceptTypes
            };

            // Act
            var acceptTypes = worker.GetKnownRequestHeader(HttpWorkerRequest.HeaderAccept);

            // Assert
            acceptTypes.Should().Be(expectedAcceptTypes);
        }
        public void Should_return_user_agent(string useraAgent)
        {
            // Arrange
            var worker = new FakeWorkerRequest {
                UserAgent = useraAgent
            };

            // Act
            var headerUserAgent = worker.GetKnownRequestHeader(HttpWorkerRequest.HeaderUserAgent);

            // Assert
            headerUserAgent.Should().Be(useraAgent);
        }
        public void Should_read_all_data_from_uri(string uriString, string expectedQuery)
        {
            // Arrange
            var uri = new Uri(uriString);
            var worker = new FakeWorkerRequest { Uri = uri };

            // Act
            var headerHost = worker.GetKnownRequestHeader(HttpWorkerRequest.HeaderHost);

            // Assert
            headerHost.Should().Be(uri.Host + ":" + uri.Port);
            worker.GetProtocol().Should().Be(uri.Scheme);
            worker.GetServerName().Should().Be(uri.Host);
            worker.GetLocalPort().Should().Be(uri.Port);
            worker.GetUriPath().Should().Be(uri.LocalPath);
            worker.GetQueryString().Should().Be(expectedQuery);
        }
        public void Should_read_all_data_from_uri(string uriString, string expectedQuery)
        {
            // Arrange
            var uri    = new Uri(uriString);
            var worker = new FakeWorkerRequest {
                Uri = uri
            };

            // Act
            var headerHost = worker.GetKnownRequestHeader(HttpWorkerRequest.HeaderHost);

            // Assert
            headerHost.Should().Be(uri.Host + ":" + uri.Port);
            worker.GetProtocol().Should().Be(uri.Scheme);
            worker.GetServerName().Should().Be(uri.Host);
            worker.GetLocalPort().Should().Be(uri.Port);
            worker.GetUriPath().Should().Be(uri.LocalPath);
            worker.GetQueryString().Should().Be(expectedQuery);
        }
        public void Should_return_user_agent(string useraAgent)
        {
            // Arrange
            var worker = new FakeWorkerRequest { UserAgent = useraAgent };

            // Act
            var headerUserAgent = worker.GetKnownRequestHeader(HttpWorkerRequest.HeaderUserAgent);

            // Assert
            headerUserAgent.Should().Be(useraAgent);
        }