Files
agent-framework/dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.UnitTests/Events/EventTest.cs
T
Chris a6b6937b94 .NET Workflows - Support agent level function invocation for declarative workflow (#1442)
* Checkpoint

* Checkpoint

* Checkpoint

* Good

* Namespace

* Namespace

* Dun

* Async Test

* AgentId

* Portable pattern

* Portable2

* Portable3

* Respond to comments

* Namespace

* Function call selection

* ToHashSet

* ToHashSet

* Updated

* Parameter name

* Final

* Tests
2025-10-14 20:42:15 +00:00

22 lines
605 B
C#

// Copyright (c) Microsoft. All rights reserved.
using System.Text.Json;
using Xunit.Abstractions;
namespace Microsoft.Agents.AI.Workflows.Declarative.UnitTests;
/// <summary>
/// Base class for event tests.
/// </summary>
public abstract class EventTest(ITestOutputHelper output) : WorkflowTest(output)
{
protected static TEvent VerifyEventSerialization<TEvent>(TEvent source)
{
string? text = JsonSerializer.Serialize(source);
Assert.NotNull(text);
TEvent? copy = JsonSerializer.Deserialize<TEvent>(text);
Assert.NotNull(copy);
return copy;
}
}