mirror of
https://github.com/microsoft/agent-framework.git
synced 2026-06-16 21:04:09 +08:00
2ab859dd94
* Renamed chat client extension method * Additional renaming * Updated documentation * Fixed tests * Small fix * Small fix
34 lines
946 B
C#
34 lines
946 B
C#
// Copyright (c) Microsoft. All rights reserved.
|
|
|
|
using System;
|
|
using A2A;
|
|
|
|
namespace Microsoft.Agents.AI.A2A.UnitTests;
|
|
|
|
/// <summary>
|
|
/// Unit tests for the A2AClientExtensions class.
|
|
/// </summary>
|
|
public sealed class A2AClientExtensionsTests
|
|
{
|
|
[Fact]
|
|
public void GetAIAgent_WithAllParameters_ReturnsA2AAgentWithSpecifiedProperties()
|
|
{
|
|
// Arrange
|
|
var a2aClient = new A2AClient(new Uri("http://test-endpoint"));
|
|
|
|
const string TestId = "test-agent-id";
|
|
const string TestName = "Test Agent";
|
|
const string TestDescription = "This is a test agent description";
|
|
|
|
// Act
|
|
var agent = a2aClient.AsAIAgent(TestId, TestName, TestDescription);
|
|
|
|
// Assert
|
|
Assert.NotNull(agent);
|
|
Assert.IsType<A2AAgent>(agent);
|
|
Assert.Equal(TestId, agent.Id);
|
|
Assert.Equal(TestName, agent.Name);
|
|
Assert.Equal(TestDescription, agent.Description);
|
|
}
|
|
}
|