mirror of
https://github.com/microsoft/agent-framework.git
synced 2026-06-16 21:04:09 +08:00
e6bfc51367
* Add additional integration tests and add OpenAIAssistant integration tests project. * Address PR comments. * Address PR comments.
22 lines
630 B
C#
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);
|
|
}
|
|
}
|