mirror of
https://github.com/microsoft/agent-framework.git
synced 2026-06-16 21:04:09 +08:00
Fix RouteBuilder test nullability warning
Agent-Logs-Url: https://github.com/microsoft/agent-framework/sessions/012f3b3b-acb9-4869-9084-b767cbe1885b Co-authored-by: lokitoth <6936551+lokitoth@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
Unverified
parent
224d9ce6ee
commit
2b66bad6b3
@@ -526,8 +526,8 @@ public sealed class RouteBuilderTests
|
||||
|
||||
private static string GetPayloadValue(PortableValue message)
|
||||
{
|
||||
TestPayload? payload = message.As<TestPayload>();
|
||||
payload.Should().NotBeNull();
|
||||
return payload.Value;
|
||||
return message.As<TestPayload>() is TestPayload payload
|
||||
? payload.Value
|
||||
: throw new InvalidOperationException("Expected catch-all message payload to deserialize as TestPayload.");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user