mirror of
https://github.com/microsoft/agent-framework.git
synced 2026-06-16 21:04:09 +08:00
* Remove additional instructions from AgentRunOptions since it is not well supported outside of ChatClientAgents * Fix typos and remove unused test. * Make further namespace fixes and update AzureAIAgent with new tests. * Expand tests to increase code coverage
36 lines
844 B
C#
36 lines
844 B
C#
// Copyright (c) Microsoft. All rights reserved.
|
|
|
|
using System;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace Microsoft.Agents.Abstractions.UnitTests;
|
|
|
|
/// <summary>
|
|
/// Unit tests for the <see cref="AgentRunOptions"/> class.
|
|
/// </summary>
|
|
public class AgentRunOptionsTests
|
|
{
|
|
[Fact]
|
|
public void CloningConstructorCopiesProperties()
|
|
{
|
|
// Arrange
|
|
var options = new AgentRunOptions
|
|
{
|
|
OnIntermediateMessages = msg => Task.CompletedTask
|
|
};
|
|
|
|
// Act
|
|
var clone = new AgentRunOptions(options);
|
|
|
|
// Assert
|
|
Assert.Equal(options.OnIntermediateMessages, clone.OnIntermediateMessages);
|
|
}
|
|
|
|
[Fact]
|
|
public void CloningConstructorThrowsIfNull()
|
|
{
|
|
// Act & Assert
|
|
Assert.Throws<ArgumentNullException>(() => new AgentRunOptions(null!));
|
|
}
|
|
}
|