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

            catClient.Run();
            this.webClient.Verify(x => x.DownloadString(It.IsAny <string>()), Times.Once);
        }
Esempio n. 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);
        }