From 09c0648486493b7eeae0e36c3e177a46790b93ec Mon Sep 17 00:00:00 2001 From: Javier Calvarro Nelson Date: Tue, 2 Dec 2025 16:20:22 +0100 Subject: [PATCH] Fix tests --- .../AGUIClientServer/AGUIDojoServer/Program.cs | 12 ++++++------ .../samples/AGUIClientServer/AGUIServer/Program.cs | 2 +- .../BasicStreamingTests.cs | 2 +- .../SharedStateTests.cs | 2 +- .../ToolCallingTests.cs | 2 +- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/dotnet/samples/AGUIClientServer/AGUIDojoServer/Program.cs b/dotnet/samples/AGUIClientServer/AGUIDojoServer/Program.cs index d853593a78..3daf626143 100644 --- a/dotnet/samples/AGUIClientServer/AGUIDojoServer/Program.cs +++ b/dotnet/samples/AGUIClientServer/AGUIDojoServer/Program.cs @@ -26,18 +26,18 @@ app.UseHttpLogging(); ChatClientAgentFactory.Initialize(app.Configuration); // Map the AG-UI agent endpoints for different scenarios -app.MapAGUI("/agentic_chat", ChatClientAgentFactory.CreateAgenticChat()); +app.MapAGUI(ChatClientAgentFactory.CreateAgenticChat(), "/agentic_chat"); -app.MapAGUI("/backend_tool_rendering", ChatClientAgentFactory.CreateBackendToolRendering()); +app.MapAGUI(ChatClientAgentFactory.CreateBackendToolRendering(), "/backend_tool_rendering"); -app.MapAGUI("/human_in_the_loop", ChatClientAgentFactory.CreateHumanInTheLoop()); +app.MapAGUI(ChatClientAgentFactory.CreateHumanInTheLoop(), "/human_in_the_loop"); -app.MapAGUI("/tool_based_generative_ui", ChatClientAgentFactory.CreateToolBasedGenerativeUI()); +app.MapAGUI(ChatClientAgentFactory.CreateToolBasedGenerativeUI(), "/tool_based_generative_ui"); -app.MapAGUI("/agentic_generative_ui", ChatClientAgentFactory.CreateAgenticUI()); +app.MapAGUI(ChatClientAgentFactory.CreateAgenticUI(), "/agentic_generative_ui"); var jsonOptions = app.Services.GetRequiredService>(); -app.MapAGUI("/shared_state", ChatClientAgentFactory.CreateSharedState(jsonOptions.Value.SerializerOptions)); +app.MapAGUI(ChatClientAgentFactory.CreateSharedState(jsonOptions.Value.SerializerOptions), "/shared_state"); await app.RunAsync(); diff --git a/dotnet/samples/AGUIClientServer/AGUIServer/Program.cs b/dotnet/samples/AGUIClientServer/AGUIServer/Program.cs index 73f5dc4b34..8d422c11e4 100644 --- a/dotnet/samples/AGUIClientServer/AGUIServer/Program.cs +++ b/dotnet/samples/AGUIClientServer/AGUIServer/Program.cs @@ -45,6 +45,6 @@ var agent = new AzureOpenAIClient( ]); // Map the AG-UI agent endpoint -app.MapAGUI("/", agent); +app.MapAGUI(agent, "/"); await app.RunAsync(); diff --git a/dotnet/tests/Microsoft.Agents.AI.Hosting.AGUI.AspNetCore.IntegrationTests/BasicStreamingTests.cs b/dotnet/tests/Microsoft.Agents.AI.Hosting.AGUI.AspNetCore.IntegrationTests/BasicStreamingTests.cs index 5bc4e8afad..c82d49587b 100644 --- a/dotnet/tests/Microsoft.Agents.AI.Hosting.AGUI.AspNetCore.IntegrationTests/BasicStreamingTests.cs +++ b/dotnet/tests/Microsoft.Agents.AI.Hosting.AGUI.AspNetCore.IntegrationTests/BasicStreamingTests.cs @@ -252,7 +252,7 @@ public sealed class BasicStreamingTests : IAsyncDisposable ? this._app.Services.GetRequiredService() : this._app.Services.GetRequiredService(); - this._app.MapAGUI("/agent", agent); + this._app.MapAGUI(agent, "/agent"); await this._app.StartAsync(); diff --git a/dotnet/tests/Microsoft.Agents.AI.Hosting.AGUI.AspNetCore.IntegrationTests/SharedStateTests.cs b/dotnet/tests/Microsoft.Agents.AI.Hosting.AGUI.AspNetCore.IntegrationTests/SharedStateTests.cs index c96f2d92d0..1e911a948b 100644 --- a/dotnet/tests/Microsoft.Agents.AI.Hosting.AGUI.AspNetCore.IntegrationTests/SharedStateTests.cs +++ b/dotnet/tests/Microsoft.Agents.AI.Hosting.AGUI.AspNetCore.IntegrationTests/SharedStateTests.cs @@ -316,7 +316,7 @@ public sealed class SharedStateTests : IAsyncDisposable this._app = builder.Build(); - this._app.MapAGUI("/agent", fakeAgent); + this._app.MapAGUI(fakeAgent, "/agent"); await this._app.StartAsync(); diff --git a/dotnet/tests/Microsoft.Agents.AI.Hosting.AGUI.AspNetCore.IntegrationTests/ToolCallingTests.cs b/dotnet/tests/Microsoft.Agents.AI.Hosting.AGUI.AspNetCore.IntegrationTests/ToolCallingTests.cs index 178ed20d73..c7d67ae6ca 100644 --- a/dotnet/tests/Microsoft.Agents.AI.Hosting.AGUI.AspNetCore.IntegrationTests/ToolCallingTests.cs +++ b/dotnet/tests/Microsoft.Agents.AI.Hosting.AGUI.AspNetCore.IntegrationTests/ToolCallingTests.cs @@ -519,7 +519,7 @@ public sealed class ToolCallingTests : IAsyncDisposable // FakeChatClient will receive options.Tools containing both server and client tools (merged by framework) var fakeChatClient = new FakeToolCallingChatClient(triggerParallelCalls, this._output, jsonSerializerOptions: jsonSerializerOptions); AIAgent baseAgent = fakeChatClient.CreateAIAgent(instructions: null, name: "base-agent", description: "A base agent for tool testing", tools: serverTools ?? []); - this._app.MapAGUI("/agent", baseAgent); + this._app.MapAGUI(baseAgent, "/agent"); await this._app.StartAsync();