Document workflow edge test helpers

Agent-Logs-Url: https://github.com/microsoft/agent-framework/sessions/af831ee2-0a99-4427-9ffd-a3b5022c1b3b

Co-authored-by: lokitoth <6936551+lokitoth@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2026-05-13 19:13:09 +00:00
committed by GitHub
Unverified
parent 73d1946928
commit 9c839ea6eb
2 changed files with 10 additions and 0 deletions
@@ -116,6 +116,13 @@ public static class WorkflowBuilderExtensions
static bool IsAllowedType(object? message) => message is null;
}
/// <summary>
/// Validates a target collection and returns it as a list.
/// </summary>
/// <param name="targets">The target executor bindings to validate.</param>
/// <returns>A validated list of target executor bindings.</returns>
/// <exception cref="ArgumentNullException">Thrown when <paramref name="targets"/> is null or contains a null element.</exception>
/// <exception cref="ArgumentException">Thrown when <paramref name="targets"/> is empty.</exception>
private static List<ExecutorBinding> ValidateTargets(IEnumerable<ExecutorBinding> targets)
{
Throw.IfNull(targets);
@@ -447,6 +447,9 @@ public partial class WorkflowBuilderSmokeTests
Assert.Throws<ArgumentNullException>("executors", () => switchBuilder.WithDefault([target, null!]));
}
/// <summary>
/// Gets the only edge emitted by the specified workflow source.
/// </summary>
private static Edge GetSingleEdge(Workflow workflow, string sourceId)
=> workflow.Edges[sourceId].Should().ContainSingle().Subject;
}