public async Task TestApiWithNewYork() { // Arrange var testCasesCsv = await new HttpClient().GetStringAsync( "https://docs.google.com/spreadsheets/d/1h-8vkF-5jEHXDIBwUpA3_otRVa30Um6qm05ZYoSgbQg/export?format=csv&id=1h-8vkF-5jEHXDIBwUpA3_otRVa30Um6qm05ZYoSgbQg&gid=0"); var baseUriMappingXml = File.ReadAllText(@"YahooApi\BaseUriMapping.xml"); var testExecutor = new TestExecutor(testCasesCsv, baseUriMappingXml); // Act var result = await testExecutor.TestAsync(); // Assert if (!string.IsNullOrWhiteSpace(result.FailedMessage)) { Assert.Fail(result.FailedMessage); } }
public async Task TestNewYork() { // Arrange var testCasesCsv = await new HttpClient().GetStringAsync( "https://docs.google.com/spreadsheets/d/15WbI7RpQZC-j--xsoYj7mfcapq96FsBi4ZVAEb_lroE/export?format=csv&id=15WbI7RpQZC-j--xsoYj7mfcapq96FsBi4ZVAEb_lroE&gid=0"); var baseUriMappingXml = File.ReadAllText(@"YahooWeather\BaseUriMapping.xml"); var userAgentMappingXml = File.ReadAllText(@"UserAgentMapping.xml"); var testExecutor = new TestExecutor(testCasesCsv, baseUriMappingXml, userAgentMappingXml); // Act var result = await testExecutor.TestAsync(); // Assert if (!string.IsNullOrWhiteSpace(result.FailedMessage)) { Assert.Fail(result.FailedMessage); } }
public async Task TestWikipediaWithUnitedStatesPage() { // Arrange var testCasesCsv = await new HttpClient().GetStringAsync( "https://docs.google.com/spreadsheets/d/1Gvnq2NlBXyrnsjBH0Xr-R8U0f9RLeCR9RH5eAdTL_XE/export?format=csv&id=1Gvnq2NlBXyrnsjBH0Xr-R8U0f9RLeCR9RH5eAdTL_XE&gid=0"); var baseUriMappingXml = File.ReadAllText(@"Wikipedia\BaseUriMapping.xml"); var userAgentMappingXml = File.ReadAllText(@"UserAgentMapping.xml"); var testExecutor = new TestExecutor(testCasesCsv, baseUriMappingXml, userAgentMappingXml); // Act var result = await testExecutor.TestAsync(); // Assert if (!string.IsNullOrWhiteSpace(result.FailedMessage)) { Assert.Fail(result.FailedMessage); } }