Files
agent-framework/dotnet/tests/Microsoft.Agents.Abstractions.UnitTests/AgentRunOptionsTests.cs
T
Roger BarretoandGitHub 89daf173c4 .Net: ChatClientAgent (Non-Streaming initial impl) (#65)
* Add non-streaming impl

* Add missing UT

* AgentThread UT + ensuring behavior

* Fix warnings

* Increase code coverage

* Add UT

* Updated abstractions fixes

* Adding AgentInvokingChatClient for instruction handling logic

* Moving AsAgentInvokingClient to ChatClientExtensions

* Address PR Feedback

* Address PR feedback

* Address PR feedback

* Signature updates for chat run options
2025-06-11 10:21:30 +00:00

38 lines
986 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
{
AdditionalInstructions = "Test instructions",
OnIntermediateMessages = msg => Task.CompletedTask
};
// Act
var clone = new AgentRunOptions(options);
// Assert
Assert.Equal(options.AdditionalInstructions, clone.AdditionalInstructions);
Assert.Equal(options.OnIntermediateMessages, clone.OnIntermediateMessages);
}
[Fact]
public void CloningConstructorThrowsIfNull()
{
// Act & Assert
Assert.Throws<ArgumentNullException>(() => new AgentRunOptions(null!));
}
}