public void StatusCodeIsCopied()
        {
            var httpResponse = new Mock <HttpResponseBase>();

            httpResponse.Setup(p => p.StatusCode).Returns(404);

            var result = HttpResponseFactory.Create(httpResponse.Object, 0);

            Assert.AreEqual(404, result.StatusCode);
        }
        public void HeadersAreCopied()
        {
            var value = KissLog.Tests.Common.CommonTestHelpers.GenerateList(5);

            var httpResponse = new Mock <HttpResponseBase>();

            httpResponse.Setup(p => p.Headers).Returns(Helpers.GenerateNameValueCollection(value));

            var result = HttpResponseFactory.Create(httpResponse.Object, 0);

            Assert.AreEqual(JsonSerializer.Serialize(value), JsonSerializer.Serialize(result.Properties.Headers));
        }
        public void NegativeContentLengthThrowsException()
        {
            var httpResponse = new Mock <HttpResponseBase>();

            var result = HttpResponseFactory.Create(httpResponse.Object, -1);
        }
 public void CreateThrowsExceptionForNullHttpResponse()
 {
     HttpResponseFactory.Create(null, 0);
 }