File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
tests/ModelContextProtocol.Tests Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,8 @@ namespace ModelContextProtocol.Tests;
1717/// </remarks>
1818public class McpProtocolExceptionDataTests : ClientServerTestBase
1919{
20+ public static bool IsNotNetFramework => ! PlatformDetection . IsNetFramework ;
21+
2022 public McpProtocolExceptionDataTests ( ITestOutputHelper testOutputHelper )
2123 : base ( testOutputHelper )
2224 {
@@ -99,7 +101,7 @@ public async Task Exception_With_Serializable_Data_Propagates_To_Client()
99101 Assert . Equal ( 404.0 , exception . Data [ "code" ] ) ; // Numbers are stored as double
100102 }
101103
102- [ Fact ]
104+ [ Fact ( Skip = "Non-serializable test data not supported on .NET Framework" , SkipUnless = nameof ( IsNotNetFramework ) ) ]
103105 public async Task Exception_With_NonSerializable_Data_Still_Propagates_Error_To_Client ( )
104106 {
105107 await using McpClient client = await CreateMcpClientForServer ( ) ;
@@ -130,7 +132,7 @@ public async Task Exception_With_NonSerializable_Data_Still_Propagates_Error_To_
130132 Assert . Equal ( "file:///path/to/resource" , exception . Data [ "uri" ] ) ;
131133 }
132134
133- [ Fact ]
135+ [ Fact ( Skip = "Non-serializable test data not supported on .NET Framework" , SkipUnless = nameof ( IsNotNetFramework ) ) ]
134136 public async Task Exception_With_Only_NonSerializable_Data_Still_Propagates_Error_To_Client ( )
135137 {
136138 await using McpClient client = await CreateMcpClientForServer ( ) ;
You can’t perform that action at this time.
0 commit comments