示例#1
0
            public void FailedRequest_ReturnsNull()
            {
                WebRequestUtilityInstance utility = new WebRequestUtilityInstance();
                const string EXAMPLE_URL          = "http://www.example.com";

                utility.FailedRequests.Add(EXAMPLE_URL);
                Assert.IsNull(utility.ReadHtmlPageFromUrl(EXAMPLE_URL));
            }
示例#2
0
            public void BGG_RequestCountExceeded_ReturnsNull()
            {
                WebRequestUtilityInstance utility = new WebRequestUtilityInstance()
                {
                    BggTooManyRequests = true
                };

                Assert.IsNull(utility.ReadHtmlPageFromUrl("http://boardgamegeek.com/"));
            }