mirror of
https://github.com/microsoft/agent-framework.git
synced 2026-06-16 21:04:09 +08:00
fix formatting issues
This commit is contained in:
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user