mirror of
https://github.com/microsoft/agent-framework.git
synced 2026-06-16 21:04:09 +08:00
PR feedback fixes.
This commit is contained in:
+18
-1
@@ -1,4 +1,4 @@
|
||||
// Copyright (c) Microsoft. All rights reserved.
|
||||
// Copyright (c) Microsoft. All rights reserved.
|
||||
|
||||
using System.Text.Json;
|
||||
using Microsoft.Agents.AI.DurableTask.Workflows;
|
||||
@@ -587,6 +587,23 @@ public sealed class DurableStreamingWorkflowRunTests
|
||||
Assert.Equal(42, result.Value);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void ExtractResult_CamelCaseSerializedObject_DeserializesToPascalCaseMembers()
|
||||
{
|
||||
// Arrange — executor outputs are serialized with DurableSerialization.Options (camelCase)
|
||||
TestPayload original = new() { Name = "camel", Value = 99 };
|
||||
string resultJson = JsonSerializer.Serialize(original, DurableSerialization.Options);
|
||||
string serializedOutput = SerializeWorkflowResult(resultJson, []);
|
||||
|
||||
// Act
|
||||
TestPayload? result = DurableStreamingWorkflowRun.ExtractResult<TestPayload>(serializedOutput);
|
||||
|
||||
// Assert
|
||||
Assert.NotNull(result);
|
||||
Assert.Equal("camel", result.Name);
|
||||
Assert.Equal(99, result.Value);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private sealed class TestPayload
|
||||
|
||||
Reference in New Issue
Block a user