From 82992641987b684eeca8057541d2e7f44c3eb65c Mon Sep 17 00:00:00 2001 From: Bill Menees Date: Mon, 29 May 2023 21:03:57 -0500 Subject: [PATCH] Add Uri serialization test --- tests/Menees.Remoting.Tests/NodeSettingsTests.cs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/Menees.Remoting.Tests/NodeSettingsTests.cs b/tests/Menees.Remoting.Tests/NodeSettingsTests.cs index 840c25f..63a64b5 100644 --- a/tests/Menees.Remoting.Tests/NodeSettingsTests.cs +++ b/tests/Menees.Remoting.Tests/NodeSettingsTests.cs @@ -12,6 +12,15 @@ public void RequireGetType() const string FrameworkStringTypeName = "System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"; TestVersions(typeof(string), CoreStringTypeName, FrameworkStringTypeName); + // On .NET Framework, we won't be able to load the System.Private.Uri assembly, and NodeSettings + // has no special knowledge of that assembly (like it does for System.Private.CoreLib). + if (!IsDotNetFramework) + { + const string CoreUriTypeName = "System.Uri, System.Private.Uri, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"; + const string FrameworkUriTypeName = "System.Uri, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"; + TestVersions(typeof(Uri), CoreUriTypeName, FrameworkUriTypeName); + } + const string CoreDictionaryTypeName = "System.Collections.Generic.IReadOnlyDictionary`2[" + "[System.String, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]," + "[System.Object, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]" +