public static async Task UnsupportedMethods() { await using var writer = new FileBufferingWriter(); True(writer.CanWrite); False(writer.CanRead); False(writer.CanSeek); False(writer.CanTimeout); Throws <NotSupportedException>(() => writer.ReadByte()); Throws <NotSupportedException>(() => writer.Position); Throws <NotSupportedException>(() => writer.Position = 42L); Throws <NotSupportedException>(() => writer.SetLength(42L)); Throws <NotSupportedException>(() => writer.Seek(0L, default)); Throws <NotSupportedException>(() => writer.Read(new Span <byte>())); Throws <NotSupportedException>(() => writer.Read(new byte[10], 0, 10)); Throws <NotSupportedException>(() => writer.BeginRead(new byte[10], 0, 10, null, null)); Throws <InvalidOperationException>(() => writer.EndRead(Task.CompletedTask)); await ThrowsAsync <NotSupportedException>(() => writer.ReadAsync(new byte[10], 0, 10)); await ThrowsAsync <NotSupportedException>(writer.ReadAsync(new byte[10], CancellationToken.None).AsTask); }