예제 #1
0
        public void BirdFactReturnsBirdFacts()
        {
            var birdClient = new TestableBirdFact(webClient.Object);

            birdClient.Run();
            this.webClient.Verify(x => x.DownloadString(It.IsAny <string>()), Times.Once);
        }
예제 #2
0
        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);
        }