From 90952ed176b69cc011335c37b254f4ee2585790b Mon Sep 17 00:00:00 2001 From: Peter Ibekwe Date: Thu, 2 Apr 2026 15:32:12 -0700 Subject: [PATCH] Update test name prefix for clarity. --- .../AggregatingExecutorTests.cs | 8 ++++---- .../InputWaiterAndOutputFilterTests.cs | 18 +++++++++--------- .../RoundRobinGroupChatManagerTests.cs | 16 ++++++++-------- 3 files changed, 21 insertions(+), 21 deletions(-) diff --git a/dotnet/tests/Microsoft.Agents.AI.Workflows.UnitTests/AggregatingExecutorTests.cs b/dotnet/tests/Microsoft.Agents.AI.Workflows.UnitTests/AggregatingExecutorTests.cs index 6e82425994..fac76744e9 100644 --- a/dotnet/tests/Microsoft.Agents.AI.Workflows.UnitTests/AggregatingExecutorTests.cs +++ b/dotnet/tests/Microsoft.Agents.AI.Workflows.UnitTests/AggregatingExecutorTests.cs @@ -8,7 +8,7 @@ namespace Microsoft.Agents.AI.Workflows.UnitTests; public class AggregatingExecutorTests { [Fact] - public async Task Test_HandleAsync_AggregatesIncrementallyAsync() + public async Task AggregatingExecutor_HandleAsync_AggregatesIncrementallyAsync() { AggregatingExecutor executor = new("sum", (aggregate, input) => aggregate == null ? input : $"{aggregate}+{input}"); @@ -25,7 +25,7 @@ public class AggregatingExecutorTests } [Fact] - public async Task Test_HandleAsync_FirstCallReceivesNullAggregateAsync() + public async Task AggregatingExecutor_HandleAsync_FirstCallReceivesNullAggregateAsync() { string? receivedAggregate = "sentinel"; @@ -42,7 +42,7 @@ public class AggregatingExecutorTests } [Fact] - public async Task Test_HandleAsync_AggregatorReturningNullClearsStateAsync() + public async Task AggregatingExecutor_HandleAsync_AggregatorReturningNullClearsStateAsync() { AggregatingExecutor executor = new("nullable", (aggregate, input) => input == "clear" ? null : (aggregate ?? "") + input); @@ -61,7 +61,7 @@ public class AggregatingExecutorTests } [Fact] - public async Task Test_HandleAsync_PersistsStateBetweenCallsAsync() + public async Task AggregatingExecutor_HandleAsync_PersistsStateBetweenCallsAsync() { AggregatingExecutor executor = new("counter", (aggregate, _) => aggregate == null ? "1" : $"{int.Parse(aggregate) + 1}"); diff --git a/dotnet/tests/Microsoft.Agents.AI.Workflows.UnitTests/InputWaiterAndOutputFilterTests.cs b/dotnet/tests/Microsoft.Agents.AI.Workflows.UnitTests/InputWaiterAndOutputFilterTests.cs index 990d4671d3..55f02db443 100644 --- a/dotnet/tests/Microsoft.Agents.AI.Workflows.UnitTests/InputWaiterAndOutputFilterTests.cs +++ b/dotnet/tests/Microsoft.Agents.AI.Workflows.UnitTests/InputWaiterAndOutputFilterTests.cs @@ -19,7 +19,7 @@ public sealed class InputWaiterTests : IDisposable } [Fact] - public async Task Test_WaitForInputAsync_CompletesAfterSignalAsync() + public async Task InputWaiter_WaitForInputAsync_CompletesAfterSignalAsync() { this._waiter.SignalInput(); @@ -31,7 +31,7 @@ public sealed class InputWaiterTests : IDisposable } [Fact] - public async Task Test_WaitForInputAsync_BlocksUntilSignaledAsync() + public async Task InputWaiter_WaitForInputAsync_BlocksUntilSignaledAsync() { Task waitTask = this._waiter.WaitForInputAsync(TimeSpan.FromSeconds(5)); @@ -45,7 +45,7 @@ public sealed class InputWaiterTests : IDisposable } [Fact] - public void Test_SignalInput_DoubleSignalDoesNotThrow() + public void InputWaiter_SignalInput_DoubleSignalDoesNotThrow() { // Binary semaphore behavior: double signal should be idempotent FluentActions.Invoking(() => @@ -56,7 +56,7 @@ public sealed class InputWaiterTests : IDisposable } [Fact] - public async Task Test_WaitForInputAsync_RespectsCancellationAsync() + public async Task InputWaiter_WaitForInputAsync_RespectsCancellationAsync() { using CancellationTokenSource cts = new(); Task waitTask = this._waiter.WaitForInputAsync(cts.Token); @@ -68,7 +68,7 @@ public sealed class InputWaiterTests : IDisposable } [Fact] - public async Task Test_WaitForInputAsync_DoesNotCompleteWhenNotSignaledAsync() + public async Task InputWaiter_WaitForInputAsync_DoesNotCompleteWhenNotSignaledAsync() { using CancellationTokenSource cts = new(); Task waitTask = this._waiter.WaitForInputAsync(cts.Token); @@ -83,7 +83,7 @@ public sealed class InputWaiterTests : IDisposable } [Fact] - public async Task Test_WaitForInputAsync_CanBeSignaledMultipleTimesSequentiallyAsync() + public async Task InputWaiter_WaitForInputAsync_CanBeSignaledMultipleTimesSequentiallyAsync() { // First signal/wait cycle this._waiter.SignalInput(); @@ -111,7 +111,7 @@ public class OutputFilterTests } [Fact] - public void Test_CanOutput_ReturnsTrueForRegisteredExecutor() + public void OutputFilter_CanOutput_ReturnsTrueForRegisteredExecutor() { OutputFilter filter = CreateFilterWithOutputFrom("end"); @@ -119,7 +119,7 @@ public class OutputFilterTests } [Fact] - public void Test_CanOutput_ReturnsFalseForUnregisteredExecutor() + public void OutputFilter_CanOutput_ReturnsFalseForUnregisteredExecutor() { OutputFilter filter = CreateFilterWithOutputFrom("end"); @@ -127,7 +127,7 @@ public class OutputFilterTests } [Fact] - public void Test_CanOutput_ReturnsFalseForNonExistentExecutor() + public void OutputFilter_CanOutput_ReturnsFalseForNonExistentExecutor() { OutputFilter filter = CreateFilterWithOutputFrom("end"); diff --git a/dotnet/tests/Microsoft.Agents.AI.Workflows.UnitTests/RoundRobinGroupChatManagerTests.cs b/dotnet/tests/Microsoft.Agents.AI.Workflows.UnitTests/RoundRobinGroupChatManagerTests.cs index ed21a052a8..d1c545f202 100644 --- a/dotnet/tests/Microsoft.Agents.AI.Workflows.UnitTests/RoundRobinGroupChatManagerTests.cs +++ b/dotnet/tests/Microsoft.Agents.AI.Workflows.UnitTests/RoundRobinGroupChatManagerTests.cs @@ -11,7 +11,7 @@ namespace Microsoft.Agents.AI.Workflows.UnitTests; public class RoundRobinGroupChatManagerTests { [Fact] - public async Task Test_SelectNextAgent_CyclesInOrderAsync() + public async Task RoundRobinGroupChat_SelectNextAgent_CyclesInOrderAsync() { TestEchoAgent agent1 = new(id: "agent1"); TestEchoAgent agent2 = new(id: "agent2"); @@ -31,7 +31,7 @@ public class RoundRobinGroupChatManagerTests } [Fact] - public async Task Test_SelectNextAgent_WrapsAroundAsync() + public async Task RoundRobinGroupChat_SelectNextAgent_WrapsAroundAsync() { TestEchoAgent agent1 = new(id: "agent1"); TestEchoAgent agent2 = new(id: "agent2"); @@ -49,7 +49,7 @@ public class RoundRobinGroupChatManagerTests } [Fact] - public async Task Test_ShouldTerminate_DefaultBehaviorTerminatesAtMaxIterationsAsync() + public async Task RoundRobinGroupChat_ShouldTerminate_DefaultBehaviorTerminatesAtMaxIterationsAsync() { TestEchoAgent agent1 = new(id: "agent1"); List agents = [agent1]; @@ -67,7 +67,7 @@ public class RoundRobinGroupChatManagerTests } [Fact] - public async Task Test_ShouldTerminate_CustomFuncTerminatesEarlyAsync() + public async Task RoundRobinGroupChat_ShouldTerminate_CustomFuncTerminatesEarlyAsync() { TestEchoAgent agent1 = new(id: "agent1"); List agents = [agent1]; @@ -84,7 +84,7 @@ public class RoundRobinGroupChatManagerTests } [Fact] - public async Task Test_ShouldTerminate_CustomFuncDoesNotTerminateWhenNotMetAsync() + public async Task RoundRobinGroupChat_ShouldTerminate_CustomFuncDoesNotTerminateWhenNotMetAsync() { TestEchoAgent agent1 = new(id: "agent1"); List agents = [agent1]; @@ -101,7 +101,7 @@ public class RoundRobinGroupChatManagerTests } [Fact] - public async Task Test_Reset_ResetsIterationCountAndAgentIndexAsync() + public async Task RoundRobinGroupChat_Reset_ResetsIterationCountAndAgentIndexAsync() { TestEchoAgent agent1 = new(id: "agent1"); TestEchoAgent agent2 = new(id: "agent2"); @@ -123,14 +123,14 @@ public class RoundRobinGroupChatManagerTests } [Fact] - public void Test_Constructor_ThrowsOnNullAgents() + public void RoundRobinGroupChat_Constructor_ThrowsOnNullAgents() { FluentActions.Invoking(() => new RoundRobinGroupChatManager(null!)) .Should().Throw(); } [Fact] - public void Test_Constructor_ThrowsOnEmptyAgents() + public void RoundRobinGroupChat_Constructor_ThrowsOnEmptyAgents() { FluentActions.Invoking(() => new RoundRobinGroupChatManager([])) .Should().Throw();