Upgraded the tests to NUnit v5.0.0 and awaited their asynchronous assertions

This commit is contained in:
Thorsten Sommer committed 2026-11-01 14:36:56 +01:00
1 parent 8e8d1999d9
commit bc47b5c492
21 files changed
+51 -54

No files matched your search

@@ -65,12 +65,12 @@ public sealed class DataSourceERICancellationTests
}
[Test]
public void ACancelledSearchStops()
public async Task ACancelledSearchStops()
{
using var cancellation = new CancellationTokenSource();
cancellation.Cancel();
Assert.CatchAsync<OperationCanceledException>(async () => await UNREACHABLE.RetrieveDataAsync("query", 1, new ChatThread(), cancellation.Token), "Reporting the data source as not searched would carry on after the user cancelled.");
await Assert.CatchAsync<OperationCanceledException>(async () => await UNREACHABLE.RetrieveDataAsync("query", 1, new ChatThread(), cancellation.Token), "Reporting the data source as not searched would carry on after the user cancelled.");
}
[Test]