mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-11-04 15:07:21 +00:00
Upgraded the tests to NUnit v5.0.0 and awaited their asynchronous assertions
This commit is contained in:
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]
|
||||
|
||||
Reference in new issue
Block a user