public void Setup() { var mockWebClient = new Mock<IWebClient>(); mockWebClient.Setup(x => x.DownloadDataTaskAsync(It.IsAny<Uri> ())).ReturnsAsync( File.ReadAllBytes("Assets/CA.zip") ); var mockWebClientFactory = new Mock<IWebClientFactory>(); mockWebClientFactory.Setup(x => x.Create ()).Returns(mockWebClient.Object); this.import = new CountryFeatureRetriever (mockWebClientFactory.Object); }
public void TearDown() { this.import = null; }