Files
dotnet-runtime/src/libraries/System.IO.FileSystem/tests/FileStream/Handle.cs
T
2016-09-22 21:33:40 -07:00

23 lines
655 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 Xunit;
namespace System.IO.Tests
{
public class FileStream_Handle : FileSystemTest
{
[Fact]
public void Handle_SameAsSafeFileHandle()
{
using (FileStream fs = new FileStream(GetTestFilePath(), FileMode.Create))
{
#pragma warning disable CS0618
Assert.Equal(fs.SafeFileHandle.DangerousGetHandle(), fs.Handle);
#pragma warning restore CS0618
}
}
}
}