public void issues_HEAD_request_before_GET_to_see_if_new_content_available_when_configured_to_do_so___workaround_for_servers_that_ignore_http_cache_request_headers_like_etag_and_ifmodifiedsince()
        {
            _configurationProvider.ProvideConfig().PrefetchHeadRequest = true;

            _validUri = "http://www.blogojciec.pl/feed/";

            configure_webrequest();

            var localFeedInfo = new LocalFeedInfo
            {
                Url = _validUri,
            };

            var first_time_response = execute(localFeedInfo);

            Assert.True(first_time_response.HasNewContent);

            localFeedInfo.LastFetch = ApplicationTime.Current.AddHours(1);
            var subsequent_response = execute(localFeedInfo);

            Assert.False(subsequent_response.HasNewContent);

            localFeedInfo.LastFetch = ApplicationTime.Current.AddDays(-10);

            var response_with_changed_content = execute(localFeedInfo);

            Assert.True(response_with_changed_content.HasNewContent);
        }
예제 #2
0
        public void sets_configured_title_in_result_feed()
        {
            var result = execute();

            Assert.Equal(_configurationProvider.ProvideConfig().Title, result.Title.Text);
        }