mirror of
https://github.com/microsoft/agent-framework.git
synced 2026-06-16 21:04:09 +08:00
.NET Workflows - Enhance support and validation for image input (#1274)
* Updated * Comments * Namespace * Comment * Cleanup * Update agent definition * Disable * Config * Enable
This commit is contained in:
+7
-4
@@ -12,7 +12,6 @@ namespace Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests;
|
||||
/// <summary>
|
||||
/// Tests execution of workflow created by <see cref="DeclarativeWorkflowBuilder"/>.
|
||||
/// </summary>
|
||||
[Collection("Global")]
|
||||
public sealed class DeclarativeCodeGenTest(ITestOutputHelper output) : WorkflowTest(output)
|
||||
{
|
||||
[Theory]
|
||||
@@ -33,7 +32,7 @@ public sealed class DeclarativeCodeGenTest(ITestOutputHelper output) : WorkflowT
|
||||
public Task ValidateScenarioAsync(string workflowFileName, string testcaseFileName, bool externalConveration = false) =>
|
||||
this.RunWorkflowAsync(Path.Combine(GetRepoFolder(), "workflow-samples", workflowFileName), testcaseFileName, externalConveration);
|
||||
|
||||
protected override async Task RunAndVerifyAsync<TInput>(Testcase testcase, string workflowPath, DeclarativeWorkflowOptions workflowOptions)
|
||||
protected override async Task RunAndVerifyAsync<TInput>(Testcase testcase, string workflowPath, DeclarativeWorkflowOptions workflowOptions, TInput input)
|
||||
{
|
||||
const string WorkflowNamespace = "Test.WorkflowProviders";
|
||||
const string WorkflowPrefix = "Test";
|
||||
@@ -47,15 +46,19 @@ public sealed class DeclarativeCodeGenTest(ITestOutputHelper output) : WorkflowT
|
||||
workflowProviderName: $"{WorkflowPrefix}WorkflowProvider",
|
||||
WorkflowNamespace,
|
||||
workflowOptions,
|
||||
(TInput)GetInput<TInput>(testcase));
|
||||
input);
|
||||
|
||||
WorkflowEvents workflowEvents = await harness.RunTestcaseAsync(testcase, (TInput)GetInput<TInput>(testcase)).ConfigureAwait(false);
|
||||
WorkflowEvents workflowEvents = await harness.RunTestcaseAsync(testcase, input).ConfigureAwait(false);
|
||||
|
||||
// Verify no action events are present
|
||||
Assert.Empty(workflowEvents.ActionInvokeEvents);
|
||||
Assert.Empty(workflowEvents.ActionCompleteEvents);
|
||||
// Verify the associated conversations
|
||||
AssertWorkflow.Conversation(workflowOptions.ConversationId, workflowEvents.ConversationEvents, testcase);
|
||||
// Verify executor events
|
||||
AssertWorkflow.EventCounts(workflowEvents.ExecutorInvokeEvents.Count - 2, testcase);
|
||||
AssertWorkflow.EventCounts(workflowEvents.ExecutorCompleteEvents.Count - 2, testcase);
|
||||
// Verify action sequences
|
||||
AssertWorkflow.EventSequence(workflowEvents.ExecutorInvokeEvents.Select(e => e.ExecutorId), testcase);
|
||||
}
|
||||
finally
|
||||
|
||||
Reference in New Issue
Block a user