Files
agent-framework/dotnet/tests/Microsoft.Agents.Abstractions.UnitTests/AgentRunOptionsTests.cs
T
westeyandGitHub 578b35723a Remove AdditionalInstructions from AgentRunOptions since it is not well supported outside of ChatClientAgents (#87)
* 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
2025-06-20 11:54:37 +00:00

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!));
}
}