mirror of
https://github.com/microsoft/agent-framework.git
synced 2026-06-16 21:04:09 +08:00
28 lines
784 B
C#
28 lines
784 B
C#
// Copyright (c) Microsoft. All rights reserved.
|
|
|
|
using Microsoft.Agents.AI.Workflows.Declarative.CodeGen;
|
|
|
|
namespace Microsoft.Agents.AI.Workflows.Declarative.UnitTests.CodeGen;
|
|
|
|
public class EdgeTemplateTest(ITestOutputHelper output) : WorkflowActionTemplateTest(output)
|
|
{
|
|
[Fact]
|
|
public void InitializeNext()
|
|
{
|
|
this.ExecuteTest("set_variable_1", "invoke_agent_2");
|
|
}
|
|
|
|
private void ExecuteTest(string sourceId, string targetId)
|
|
{
|
|
// Arrange
|
|
EdgeTemplate template = new(sourceId, targetId);
|
|
|
|
// Act
|
|
string workflowCode = template.TransformText();
|
|
this.Output.WriteLine(workflowCode.Trim());
|
|
|
|
// Assert
|
|
Assert.Equal("builder.AddEdge(setVariable1, invokeAgent2);", workflowCode.Trim());
|
|
}
|
|
}
|