Files
agent-framework/dotnet/tests/AgentConformance.IntegrationTests/Support/ThreadCleanup.cs
T
westey e6bfc51367 Add additional integration tests and add OpenAIAssistant integration tests project. (#79)
* Add additional integration tests and add OpenAIAssistant integration tests project.

* Address PR comments.

* Address PR comments.
2025-06-17 11:43:29 +00:00

22 lines
630 B
C#

// Copyright (c) Microsoft. All rights reserved.
using System;
using System.Threading.Tasks;
using AgentConformanceTests;
using Microsoft.Agents;
namespace AgentConformance.IntegrationTests.Support;
/// <summary>
/// Helper class to delete threads after tests.
/// </summary>
/// <param name="thread">The thread to delete.</param>
/// <param name="fixture">The fixture that provides agent specific capabilities.</param>
internal sealed class ThreadCleanup(AgentThread thread, AgentFixture fixture) : IAsyncDisposable
{
public async ValueTask DisposeAsync()
{
await fixture.DeleteThreadAsync(thread);
}
}