fix formatting issues

This commit is contained in:
SergeyMenshykh
2026-04-22 13:44:22 +01:00
Unverified
parent cd1f4c2a93
commit 424d66ad74
2 changed files with 8 additions and 9 deletions
@@ -692,16 +692,16 @@ public sealed class A2AAgentHandlerTests
.ReturnsAsync(() => new TestAgentSession());
agentMock
.Protected()
.Setup<ValueTask<System.Text.Json.JsonElement>>("SerializeSessionCoreAsync",
.Setup<ValueTask<JsonElement>>("SerializeSessionCoreAsync",
ItExpr.IsAny<AgentSession>(),
ItExpr.IsAny<System.Text.Json.JsonSerializerOptions?>(),
ItExpr.IsAny<JsonSerializerOptions?>(),
ItExpr.IsAny<CancellationToken>())
.ReturnsAsync(System.Text.Json.JsonDocument.Parse("{}").RootElement);
.ReturnsAsync(JsonDocument.Parse("{}").RootElement);
agentMock
.Protected()
.Setup<ValueTask<AgentSession>>("DeserializeSessionCoreAsync",
ItExpr.IsAny<System.Text.Json.JsonElement>(),
ItExpr.IsAny<System.Text.Json.JsonSerializerOptions?>(),
ItExpr.IsAny<JsonElement>(),
ItExpr.IsAny<JsonSerializerOptions?>(),
ItExpr.IsAny<CancellationToken>())
.ReturnsAsync(sessionInstance);
agentMock
@@ -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<A2ARunDecisionContext, CancellationToken, ValueTask<bool>> callback = (_, _) => ValueTask.FromResult(true);
var mode1 = AgentRunMode.AllowBackgroundWhen(callback);
var mode2 = AgentRunMode.AllowBackgroundWhen(callback);
static ValueTask<bool> CallbackAsync(A2ARunDecisionContext _, CancellationToken __) => ValueTask.FromResult(true);
var mode1 = AgentRunMode.AllowBackgroundWhen(CallbackAsync);
var mode2 = AgentRunMode.AllowBackgroundWhen(CallbackAsync);
// Act & Assert
Assert.True(mode1.Equals(mode2));