Skip to content

Commit 3191335

Browse files
halter73Copilot
andcommitted
Fix net472 build: avoid KeyValuePair deconstruction in test
Deconstruct() on KeyValuePair<T,U> is not available on .NET Framework 4.7.2. Use kvp.Key / kvp.Value instead. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 4614095 commit 3191335

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

tests/ModelContextProtocol.Tests/Transport/StdioClientTransportTests.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -304,10 +304,10 @@ public void GetDefaultEnvironmentVariables_ExcludesShellFunctionValues()
304304
{
305305
// Verify the postcondition: no returned values start with "()" (shell function markers).
306306
var result = StdioClientTransportOptions.GetDefaultEnvironmentVariables();
307-
foreach (var (key, value) in result)
307+
foreach (var kvp in result)
308308
{
309-
Assert.False(value?.StartsWith("()") ?? false,
310-
$"Value for '{key}' starts with '()' and should have been filtered as a shell function.");
309+
Assert.False(kvp.Value?.StartsWith("()") ?? false,
310+
$"Value for '{kvp.Key}' starts with '()' and should have been filtered as a shell function.");
311311
}
312312
}
313313

0 commit comments

Comments
 (0)