public void CheckIfModifiedSince_HasNotBeenModifiedSince_False()
        {
            //Arrange
            var httpRequest = MockRepository.GenerateMock<HttpRequestBase>();
            var lastModified = new DateTime(2010, 01, 01, 01, 01, 01);
            var headerValue = lastModified.AddSeconds(1).ToString("r");
            var headerType = HttpRequestHeader.IfModifiedSince;
            var headerName = (string)headerType;

            httpRequest.Expect(x => x.Headers[headerName]).Return(headerValue);

            //Act
            var httpRequestHeaderHelper = new HttpRequestHeaderHelper();
            var hasBeenModifiedSince = httpRequestHeaderHelper.CheckIfModifiedSince(httpRequest, lastModified);

            //Assert
            httpRequest.VerifyAllExpectations();
            Assert.IsNotNull(hasBeenModifiedSince);
            Assert.False(hasBeenModifiedSince.Value);
        }
        public void CheckIfModifiedSince_DateModifiedSinceInvalid_False()
        {
            //Arrange
            var httpRequest = MockRepository.GenerateMock<HttpRequestBase>();
            var lastModified = new DateTime(2010, 01, 01, 01, 01, 01, DateTimeKind.Utc);
            var headerValue = "invalid";
            var headerType = HttpRequestHeader.IfModifiedSince;
            var headerName = (string)headerType;

            httpRequest.Expect(x => x.Headers[headerName]).Return(headerValue);

            //Act
            var httpRequestHeaderHelper = new HttpRequestHeaderHelper();
            var hasBeenModifiedSince = httpRequestHeaderHelper.CheckIfModifiedSince(httpRequest, lastModified);

            //Assert
            httpRequest.VerifyAllExpectations();
            Assert.IsNull(hasBeenModifiedSince);
        }