Files
agent-framework/dotnet/tests/Microsoft.Extensions.AI.Agents.Abstractions.UnitTests/AgentRunOptionsTests.cs
T
Mark Wallace 95738b0ac2 Renaming to use Microsoft.Extensions prefix (#120)
* Rename the folders

* Rename the .csproj files

* Some build file updates

* Update namespaces

* Fix order of imports

* Fix order of imports

* Fix order of imports
2025-07-01 08:15:28 +00:00

36 lines
858 B
C#

// Copyright (c) Microsoft. All rights reserved.
using System;
using System.Threading.Tasks;
namespace Microsoft.Extensions.AI.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!));
}
}