mirror of
https://github.com/microsoft/agent-framework.git
synced 2026-06-16 21:04:09 +08:00
* 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
38 lines
986 B
C#
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!));
|
|
}
|
|
}
|