Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Async stream/bytes usage #694

Merged
merged 11 commits into from
Nov 1, 2022
Next Next commit
.
SimonCropp committed Nov 1, 2022
commit d18b26fd295d8f4dd69d896883780ee7756ef70c
1 change: 1 addition & 0 deletions src/Verify.Tests/StreamTests.ByteArrayTask.verified.bin
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

1 change: 1 addition & 0 deletions src/Verify.Tests/StreamTests.FileStreamTask.verified.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Foo
1 change: 1 addition & 0 deletions src/Verify.Tests/StreamTests.StreamTask.verified.bin
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

20 changes: 20 additions & 0 deletions src/Verify.Tests/StreamTests.cs
Original file line number Diff line number Diff line change
@@ -9,6 +9,14 @@ public Task Stream() =>
1
}));

[Fact]
public Task StreamTask() =>
Verify(
Task.FromResult( new MemoryStream(new byte[]
{
1
})));

[Fact]
public Task ByteArray() =>
Verify(
@@ -17,6 +25,14 @@ public Task ByteArray() =>
1
});

[Fact]
public Task ByteArrayTask() =>
Verify(
Task.FromResult( new byte[]
{
1
}));

[Fact]
public Task ByteArrayWithExtension() =>
Verify(
@@ -77,6 +93,10 @@ public Task FileStream() =>

#endregion

[Fact]
public Task FileStreamTask() =>
Verify(Task.FromResult(File.OpenRead("sample.txt")));

[Fact]
public Task StreamNotAtStart()
{