mirror of
https://github.com/BepInEx/dotnet-runtime.git
synced 2026-11-24 04:11:14 -10:00
Commit migrated from https://github.com/dotnet/corefx/commit/a8c26b8f37139e7b2fc25acd8859b1782319dcd6
23 lines
766 B
C#
23 lines
766 B
C#
// 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.IO.Tests
|
|
{
|
|
public partial class DirectoryInfo_Serialization : FileSystemTest
|
|
{
|
|
[Fact]
|
|
public void SerializeDeserialize_Roundtrip()
|
|
{
|
|
var orig = new DirectoryInfo("SomePath");
|
|
DirectoryInfo cloned = BinaryFormatterHelpers.Clone(orig);
|
|
Assert.Equal(orig.Name, cloned.Name);
|
|
Assert.Equal(orig.FullName, cloned.FullName);
|
|
Assert.Equal(orig.ToString(), cloned.ToString());
|
|
}
|
|
}
|
|
}
|