Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.
/ corefx Public archive

Commit

Permalink
Moved UnitySerializationHolder serialization test to System.Runtime.T…
Browse files Browse the repository at this point in the history
…ests
  • Loading branch information
ViktorHofer committed Sep 12, 2017
1 parent 34da99c commit 9f79ce6
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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<ArgumentException>(!PlatformDetection.IsFullFramework,
() => DeserializeBlobToObject(UnitySerializationHolderAssemblyBase64String, FormatterAssemblyStyle.Full));
}

[Fact]
public void ArraySegmentDefaultCtor()
{
Expand Down
20 changes: 20 additions & 0 deletions src/System.Runtime/tests/UnitySerializationHolderTests.cs
Original file line number Diff line number Diff line change
@@ -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<ArgumentException>(!PlatformDetection.IsFullFramework,
() => BinaryFormatterHelpers.FromBase64String(UnitySerializationHolderAssemblyBase64String));
}
}
}

0 comments on commit 9f79ce6

Please sign in to comment.