Exemple #1
0
        public void RunSearch_Capture_ServiceUnavailable_Error()
        {
            Mock<IUrlFetcher> search = new Mock<IUrlFetcher>();
            search.Setup(x => x.RunSearch(It.IsAny<string>())).Returns(HttpStatusCode.ServiceUnavailable);
            bing = new Bing(search.Object, searchurl, searchquery);

            Assert.AreEqual(HttpStatusCode.ServiceUnavailable, bing.RunSearch());
        }
Exemple #2
0
 public void Init()
 {
     IUrlFetcher fetcher = new UrlFetcher();
     bing = new Bing(fetcher, searchurl, searchquery);
 }