Example #1
0
        public void CatFactsReturnsPrice()
        {
            var catClient = new TestableCatFacts(webClient.Object);

            catClient.Run();
            this.webClient.Verify(x => x.DownloadString(It.IsAny <string>()), Times.Once);
        }
Example #2
0
        public void CatFactsDoesNotThrowsIfNoResult()
        {
            this.webClient.Setup(x => x.DownloadString(It.IsAny <string>())).Returns("");

            var catClient = new TestableCatFacts(webClient.Object);

            catClient.Run();
            this.webClient.Verify(x => x.DownloadString(It.IsAny <string>()), Times.Once);
        }