diff --git a/src/DotNext.Tests/IO/FileBufferingWriterTests.cs b/src/DotNext.Tests/IO/FileBufferingWriterTests.cs index b566fc5de..fdda44b6d 100644 --- a/src/DotNext.Tests/IO/FileBufferingWriterTests.cs +++ b/src/DotNext.Tests/IO/FileBufferingWriterTests.cs @@ -3,6 +3,8 @@ namespace DotNext.IO; +using Buffers; + public sealed class FileBufferingWriterTests : Test { [Theory] @@ -323,12 +325,12 @@ public static void CtorExceptions() public static async Task WriteDuringReadAsync() { using var writer = new FileBufferingWriter(); - writer.Write(new byte[] { 1, 2, 3 }); + writer.Write(stackalloc byte[] { 1, 2, 3 }); using var manager = writer.GetWrittenContent(); Equal(new byte[] { 1, 2, 3 }, manager.Memory.ToArray()); - Throws(writer.Clear); + Throws(writer.As>().Clear); Throws(() => writer.WriteByte(2)); - Throws(() => writer.GetWrittenContent()); + Throws(writer.GetWrittenContent); await ThrowsAsync(() => writer.WriteAsync(new byte[2], 0, 2)); await ThrowsAsync(writer.GetWrittenContentAsync().AsTask); }