mirror of
https://github.com/microsoft/agent-framework.git
synced 2026-06-16 21:04:09 +08:00
98819e5e94
Co-authored-by: crickman <66376200+crickman@users.noreply.github.com>
37 lines
1.4 KiB
C#
37 lines
1.4 KiB
C#
// Copyright (c) Microsoft. All rights reserved.
|
|
|
|
using System.Collections.Generic;
|
|
using AgentConversation.IntegrationTests;
|
|
using Xunit.Abstractions;
|
|
|
|
namespace Microsoft.Agents.AI.Abstractions.IntegrationTests;
|
|
|
|
/// <summary>
|
|
/// Example integration tests that exercise the <see cref="ConversationHarness"/> using an
|
|
/// in-memory <see cref="InMemoryConversationTestSystem"/> that does not require live AI credentials.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// This class derives from <see cref="ConversationHarnessTests{TSystem}"/> and provides the system
|
|
/// and test cases. The <see cref="ConversationHarnessTests{TSystem}.RunAllTestCasesAsync"/> test
|
|
/// method is inherited automatically and will run all cases returned by <see cref="GetTestCases"/>.
|
|
/// </para>
|
|
/// <para>
|
|
/// To adapt these tests to a real AI backend, replace <see cref="InMemoryConversationTestSystem"/>
|
|
/// with an implementation that constructs agents backed by your AI service.
|
|
/// </para>
|
|
/// </remarks>
|
|
public class AgentConversationHarnessTests(ITestOutputHelper output)
|
|
: ConversationHarnessTests<InMemoryConversationTestSystem>(output)
|
|
{
|
|
/// <inheritdoc />
|
|
protected override InMemoryConversationTestSystem CreateTestSystem() =>
|
|
new InMemoryConversationTestSystem();
|
|
|
|
/// <inheritdoc />
|
|
protected override IEnumerable<IConversationTestCase> GetTestCases() =>
|
|
[
|
|
new MenuConversationTestCase(),
|
|
];
|
|
}
|