From 424d66ad74171347217576234e209f5dbdf4105c Mon Sep 17 00:00:00 2001 From: SergeyMenshykh Date: Wed, 22 Apr 2026 13:44:22 +0100 Subject: [PATCH] fix formatting issues --- .../A2AAgentHandlerTests.cs | 10 +++++----- .../AgentRunModeTests.cs | 7 +++---- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/dotnet/tests/Microsoft.Agents.AI.Hosting.A2A.UnitTests/A2AAgentHandlerTests.cs b/dotnet/tests/Microsoft.Agents.AI.Hosting.A2A.UnitTests/A2AAgentHandlerTests.cs index 7c5287f09f..6558144184 100644 --- a/dotnet/tests/Microsoft.Agents.AI.Hosting.A2A.UnitTests/A2AAgentHandlerTests.cs +++ b/dotnet/tests/Microsoft.Agents.AI.Hosting.A2A.UnitTests/A2AAgentHandlerTests.cs @@ -692,16 +692,16 @@ public sealed class A2AAgentHandlerTests .ReturnsAsync(() => new TestAgentSession()); agentMock .Protected() - .Setup>("SerializeSessionCoreAsync", + .Setup>("SerializeSessionCoreAsync", ItExpr.IsAny(), - ItExpr.IsAny(), + ItExpr.IsAny(), ItExpr.IsAny()) - .ReturnsAsync(System.Text.Json.JsonDocument.Parse("{}").RootElement); + .ReturnsAsync(JsonDocument.Parse("{}").RootElement); agentMock .Protected() .Setup>("DeserializeSessionCoreAsync", - ItExpr.IsAny(), - ItExpr.IsAny(), + ItExpr.IsAny(), + ItExpr.IsAny(), ItExpr.IsAny()) .ReturnsAsync(sessionInstance); agentMock diff --git a/dotnet/tests/Microsoft.Agents.AI.Hosting.A2A.UnitTests/AgentRunModeTests.cs b/dotnet/tests/Microsoft.Agents.AI.Hosting.A2A.UnitTests/AgentRunModeTests.cs index 1114e39c31..cbe1254b81 100644 --- a/dotnet/tests/Microsoft.Agents.AI.Hosting.A2A.UnitTests/AgentRunModeTests.cs +++ b/dotnet/tests/Microsoft.Agents.AI.Hosting.A2A.UnitTests/AgentRunModeTests.cs @@ -3,7 +3,6 @@ using System; using System.Threading; using System.Threading.Tasks; -using A2A; namespace Microsoft.Agents.AI.Hosting.A2A.UnitTests; @@ -152,9 +151,9 @@ public sealed class AgentRunModeTests public void Equals_AllowBackgroundWhen_SameDelegate_AreEqual() { // Arrange - Func> callback = (_, _) => ValueTask.FromResult(true); - var mode1 = AgentRunMode.AllowBackgroundWhen(callback); - var mode2 = AgentRunMode.AllowBackgroundWhen(callback); + static ValueTask CallbackAsync(A2ARunDecisionContext _, CancellationToken __) => ValueTask.FromResult(true); + var mode1 = AgentRunMode.AllowBackgroundWhen(CallbackAsync); + var mode2 = AgentRunMode.AllowBackgroundWhen(CallbackAsync); // Act & Assert Assert.True(mode1.Equals(mode2));