public void BirdFactReturnsBirdFacts() { var birdClient = new TestableBirdFact(webClient.Object); birdClient.Run(); this.webClient.Verify(x => x.DownloadString(It.IsAny <string>()), Times.Once); }
public void BirdFactDoesNotThrowsIfNoResult() { this.webClient.Setup(x => x.DownloadString(It.IsAny <string>())).Returns(""); var birdClient = new TestableBirdFact(webClient.Object); birdClient.Run(); this.webClient.Verify(x => x.DownloadString(It.IsAny <string>()), Times.Once); }