Skip to content

Commit 0fb6cce

Browse files
committed
test(api): approve new MockFileStream read overrides in public API
The shared-contents fix added public overrides to MockFileStream (ReadByte and ReadAsync(byte[]) on all frameworks; Read(Span) and ReadAsync(Memory) where FEATURE_SPAN is defined). Regenerate the expected public API surface via the AcceptApiChanges test so VerifyPublicApiForTestingHelpers passes.
1 parent 7b85ec1 commit 0fb6cce

7 files changed

Lines changed: 24 additions & 0 deletions

tests/TestableIO.System.IO.Abstractions.Api.Tests/Expected/TestableIO.System.IO.Abstractions.TestingHelpers_net10.0.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,11 @@ namespace System.IO.Abstractions.TestingHelpers
404404
public object GetAccessControl() { }
405405
[System.Runtime.Versioning.SupportedOSPlatform("windows")]
406406
public object GetAccessControl(System.IO.Abstractions.IFileSystemAclSupport.AccessControlSections includeSections) { }
407+
public override int Read(System.Span<byte> buffer) { }
407408
public override int Read(byte[] buffer, int offset, int count) { }
409+
public override System.Threading.Tasks.ValueTask<int> ReadAsync(System.Memory<byte> buffer, System.Threading.CancellationToken cancellationToken = default) { }
410+
public override System.Threading.Tasks.Task<int> ReadAsync(byte[] buffer, int offset, int count, System.Threading.CancellationToken cancellationToken) { }
411+
public override int ReadByte() { }
408412
[System.Runtime.Versioning.SupportedOSPlatform("windows")]
409413
public void SetAccessControl(object value) { }
410414
public override void SetLength(long value) { }

tests/TestableIO.System.IO.Abstractions.Api.Tests/Expected/TestableIO.System.IO.Abstractions.TestingHelpers_net472.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -316,6 +316,8 @@ namespace System.IO.Abstractions.TestingHelpers
316316
public object GetAccessControl() { }
317317
public object GetAccessControl(System.IO.Abstractions.IFileSystemAclSupport.AccessControlSections includeSections) { }
318318
public override int Read(byte[] buffer, int offset, int count) { }
319+
public override System.Threading.Tasks.Task<int> ReadAsync(byte[] buffer, int offset, int count, System.Threading.CancellationToken cancellationToken) { }
320+
public override int ReadByte() { }
319321
public void SetAccessControl(object value) { }
320322
public override void SetLength(long value) { }
321323
public override void Write(byte[] buffer, int offset, int count) { }

tests/TestableIO.System.IO.Abstractions.Api.Tests/Expected/TestableIO.System.IO.Abstractions.TestingHelpers_net6.0.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,11 @@ namespace System.IO.Abstractions.TestingHelpers
366366
public object GetAccessControl() { }
367367
[System.Runtime.Versioning.SupportedOSPlatform("windows")]
368368
public object GetAccessControl(System.IO.Abstractions.IFileSystemAclSupport.AccessControlSections includeSections) { }
369+
public override int Read(System.Span<byte> buffer) { }
369370
public override int Read(byte[] buffer, int offset, int count) { }
371+
public override System.Threading.Tasks.ValueTask<int> ReadAsync(System.Memory<byte> buffer, System.Threading.CancellationToken cancellationToken = default) { }
372+
public override System.Threading.Tasks.Task<int> ReadAsync(byte[] buffer, int offset, int count, System.Threading.CancellationToken cancellationToken) { }
373+
public override int ReadByte() { }
370374
[System.Runtime.Versioning.SupportedOSPlatform("windows")]
371375
public void SetAccessControl(object value) { }
372376
public override void SetLength(long value) { }

tests/TestableIO.System.IO.Abstractions.Api.Tests/Expected/TestableIO.System.IO.Abstractions.TestingHelpers_net8.0.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,11 @@ namespace System.IO.Abstractions.TestingHelpers
390390
public object GetAccessControl() { }
391391
[System.Runtime.Versioning.SupportedOSPlatform("windows")]
392392
public object GetAccessControl(System.IO.Abstractions.IFileSystemAclSupport.AccessControlSections includeSections) { }
393+
public override int Read(System.Span<byte> buffer) { }
393394
public override int Read(byte[] buffer, int offset, int count) { }
395+
public override System.Threading.Tasks.ValueTask<int> ReadAsync(System.Memory<byte> buffer, System.Threading.CancellationToken cancellationToken = default) { }
396+
public override System.Threading.Tasks.Task<int> ReadAsync(byte[] buffer, int offset, int count, System.Threading.CancellationToken cancellationToken) { }
397+
public override int ReadByte() { }
394398
[System.Runtime.Versioning.SupportedOSPlatform("windows")]
395399
public void SetAccessControl(object value) { }
396400
public override void SetLength(long value) { }

tests/TestableIO.System.IO.Abstractions.Api.Tests/Expected/TestableIO.System.IO.Abstractions.TestingHelpers_net9.0.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,11 @@ namespace System.IO.Abstractions.TestingHelpers
404404
public object GetAccessControl() { }
405405
[System.Runtime.Versioning.SupportedOSPlatform("windows")]
406406
public object GetAccessControl(System.IO.Abstractions.IFileSystemAclSupport.AccessControlSections includeSections) { }
407+
public override int Read(System.Span<byte> buffer) { }
407408
public override int Read(byte[] buffer, int offset, int count) { }
409+
public override System.Threading.Tasks.ValueTask<int> ReadAsync(System.Memory<byte> buffer, System.Threading.CancellationToken cancellationToken = default) { }
410+
public override System.Threading.Tasks.Task<int> ReadAsync(byte[] buffer, int offset, int count, System.Threading.CancellationToken cancellationToken) { }
411+
public override int ReadByte() { }
408412
[System.Runtime.Versioning.SupportedOSPlatform("windows")]
409413
public void SetAccessControl(object value) { }
410414
public override void SetLength(long value) { }

tests/TestableIO.System.IO.Abstractions.Api.Tests/Expected/TestableIO.System.IO.Abstractions.TestingHelpers_netstandard2.0.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -316,6 +316,8 @@ namespace System.IO.Abstractions.TestingHelpers
316316
public object GetAccessControl() { }
317317
public object GetAccessControl(System.IO.Abstractions.IFileSystemAclSupport.AccessControlSections includeSections) { }
318318
public override int Read(byte[] buffer, int offset, int count) { }
319+
public override System.Threading.Tasks.Task<int> ReadAsync(byte[] buffer, int offset, int count, System.Threading.CancellationToken cancellationToken) { }
320+
public override int ReadByte() { }
319321
public void SetAccessControl(object value) { }
320322
public override void SetLength(long value) { }
321323
public override void Write(byte[] buffer, int offset, int count) { }

tests/TestableIO.System.IO.Abstractions.Api.Tests/Expected/TestableIO.System.IO.Abstractions.TestingHelpers_netstandard2.1.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,11 @@ namespace System.IO.Abstractions.TestingHelpers
341341
public override System.Threading.Tasks.Task FlushAsync(System.Threading.CancellationToken cancellationToken) { }
342342
public object GetAccessControl() { }
343343
public object GetAccessControl(System.IO.Abstractions.IFileSystemAclSupport.AccessControlSections includeSections) { }
344+
public override int Read(System.Span<byte> buffer) { }
344345
public override int Read(byte[] buffer, int offset, int count) { }
346+
public override System.Threading.Tasks.ValueTask<int> ReadAsync(System.Memory<byte> buffer, System.Threading.CancellationToken cancellationToken = default) { }
347+
public override System.Threading.Tasks.Task<int> ReadAsync(byte[] buffer, int offset, int count, System.Threading.CancellationToken cancellationToken) { }
348+
public override int ReadByte() { }
345349
public void SetAccessControl(object value) { }
346350
public override void SetLength(long value) { }
347351
public override void Write(System.ReadOnlySpan<byte> buffer) { }

0 commit comments

Comments
 (0)