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()); }
public void Init() { IUrlFetcher fetcher = new UrlFetcher(); bing = new Bing(fetcher, searchurl, searchquery); }