diff --git a/src/System.Runtime.Serialization.Formatters/tests/BinaryFormatterTests.cs b/src/System.Runtime.Serialization.Formatters/tests/BinaryFormatterTests.cs index 9f64e659e0c8..690071e3d33e 100644 --- a/src/System.Runtime.Serialization.Formatters/tests/BinaryFormatterTests.cs +++ b/src/System.Runtime.Serialization.Formatters/tests/BinaryFormatterTests.cs @@ -86,14 +86,6 @@ private static void ValidateAndRoundtrip(object obj, string[] blobs, bool isEqua } } - [Fact] - public void UnitySerializationHolderWithAssemblySingleton() - { - const string UnitySerializationHolderAssemblyBase64String = "AAEAAAD/////AQAAAAAAAAAEAQAAAB9TeXN0ZW0uVW5pdHlTZXJpYWxpemF0aW9uSG9sZGVyAwAAAAREYXRhCVVuaXR5VHlwZQxBc3NlbWJseU5hbWUBAAEIBgIAAABLbXNjb3JsaWIsIFZlcnNpb249NC4wLjAuMCwgQ3VsdHVyZT1uZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1iNzdhNWM1NjE5MzRlMDg5BgAAAAkCAAAACw=="; - AssertExtensions.ThrowsIf(!PlatformDetection.IsFullFramework, - () => DeserializeBlobToObject(UnitySerializationHolderAssemblyBase64String, FormatterAssemblyStyle.Full)); - } - [Fact] public void ArraySegmentDefaultCtor() { diff --git a/src/System.Runtime/tests/UnitySerializationHolderTests.cs b/src/System.Runtime/tests/UnitySerializationHolderTests.cs new file mode 100644 index 000000000000..ab28b42bad17 --- /dev/null +++ b/src/System.Runtime/tests/UnitySerializationHolderTests.cs @@ -0,0 +1,20 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System.Runtime.Serialization.Formatters.Tests; +using Xunit; + +namespace System.Tests +{ + public class UnitySerializationHolderTests + { + [Fact] + public void UnitySerializationHolderWithAssemblySingleton() + { + const string UnitySerializationHolderAssemblyBase64String = "AAEAAAD/////AQAAAAAAAAAEAQAAAB9TeXN0ZW0uVW5pdHlTZXJpYWxpemF0aW9uSG9sZGVyAwAAAAREYXRhCVVuaXR5VHlwZQxBc3NlbWJseU5hbWUBAAEIBgIAAABLbXNjb3JsaWIsIFZlcnNpb249NC4wLjAuMCwgQ3VsdHVyZT1uZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1iNzdhNWM1NjE5MzRlMDg5BgAAAAkCAAAACw=="; + AssertExtensions.ThrowsIf(!PlatformDetection.IsFullFramework, + () => BinaryFormatterHelpers.FromBase64String(UnitySerializationHolderAssemblyBase64String)); + } + } +}