Skip to content

Commit

Permalink
fix review comment
Browse files Browse the repository at this point in the history
  • Loading branch information
sensslen committed Dec 29, 2024
1 parent 77f6450 commit c6d89fd
Showing 1 changed file with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ namespace NuGetUtility.Test.LicenseValidator
[TestFixture]
public class UrlToLicenseMappingTest
{
[Ignore("chrome")]
[Parallelizable(scope: ParallelScope.All)]
[TestCaseSource(typeof(UrlToLicenseMapping), nameof(UrlToLicenseMapping.Default))]
public async Task License_Should_Be_Available_And_Match_Expected_License(KeyValuePair<Uri, string> mappedValue)
Expand All @@ -21,7 +20,7 @@ public async Task License_Should_Be_Available_And_Match_Expected_License(KeyValu
try
{
using var driver = new DisposableWebDriver();
driver.Navigate().GoToUrl(mappedValue.Key.ToString());
await driver.Navigate().GoToUrlAsync(mappedValue.Key.ToString());

await Verify(driver.FindElement(By.TagName("body")).Text).HashParameters().UseStringComparer(CompareLicense);
return;
Expand All @@ -33,14 +32,14 @@ public async Task License_Should_Be_Available_And_Match_Expected_License(KeyValu
throw;
}
retryCount++;
TestContext.Out.WriteLine($"Failed to check license for the {retryCount} time - retrying");
TestContext.Out.WriteLine(e);
await TestContext.Out.WriteLineAsync($"Failed to check license for the {retryCount} time - retrying");
await TestContext.Out.WriteLineAsync(e.ToString());
}
}

}

private Task<CompareResult> CompareLicense(string received, string verified, IReadOnlyDictionary<string, object> context)
private static Task<CompareResult> CompareLicense(string received, string verified, IReadOnlyDictionary<string, object> context)
{
return Task.FromResult(new CompareResult((!string.IsNullOrWhiteSpace(verified)) && received.Contains(verified)));
}
Expand Down

0 comments on commit c6d89fd

Please sign in to comment.