mirror of
https://github.com/microsoft/agent-framework.git
synced 2026-06-16 21:04:09 +08:00
a6b6937b94
* Checkpoint * Checkpoint * Checkpoint * Good * Namespace * Namespace * Dun * Async Test * AgentId * Portable pattern * Portable2 * Portable3 * Respond to comments * Namespace * Function call selection * ToHashSet * ToHashSet * Updated * Parameter name * Final * Tests
29 lines
919 B
C#
29 lines
919 B
C#
// Copyright (c) Microsoft. All rights reserved.
|
|
|
|
using System.Collections.Generic;
|
|
using Microsoft.Agents.AI.Workflows.Declarative.Events;
|
|
using Microsoft.Extensions.AI;
|
|
using Xunit.Abstractions;
|
|
|
|
namespace Microsoft.Agents.AI.Workflows.Declarative.UnitTests.Events;
|
|
|
|
/// <summary>
|
|
/// Base class for event tests.
|
|
/// </summary>
|
|
public sealed class AgentToolRequestTest(ITestOutputHelper output) : EventTest(output)
|
|
{
|
|
[Fact]
|
|
public void VerifySerialization()
|
|
{
|
|
AgentToolRequest copy =
|
|
VerifyEventSerialization(
|
|
new AgentToolRequest(
|
|
"agent",
|
|
[
|
|
new FunctionCallContent("call1", "result1"),
|
|
new FunctionCallContent("call2", "result2", new Dictionary<string, object?>() { { "name", "Clam Chowder" } })
|
|
]));
|
|
Assert.Equal("agent", copy.AgentName);
|
|
}
|
|
}
|