Skip to content

Commit

Permalink
start replace with testing sequence
Browse files Browse the repository at this point in the history
  • Loading branch information
julienasp committed May 28, 2023
1 parent 3397fb6 commit c4e9c1b
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions Tests/SuperLinq.Async.Test/TimeoutTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,10 @@ public async Task TimeoutExceptionWithoutCancellation()
[Fact]
public async Task TimeoutExceptionWithoutOperationCanceledExceptionInnerException()
{
var sequence = new SequenceWithoutThrowIfCancellationRequested();
await using var ts = new SequenceWithoutThrowIfCancellationRequested()
.AsTestingSequence();

var result = sequence.Timeout(TimeSpan.FromMilliseconds(0));
var result = ts.Timeout(TimeSpan.FromMilliseconds(0));

var timeoutException = await Assert.ThrowsAsync<TimeoutException>(
async () => await result.Consume());
Expand All @@ -74,9 +75,10 @@ public async Task TimeoutExceptionWithoutOperationCanceledExceptionInnerExceptio
[Fact]
public async Task TimeoutExceptionWithOperationCanceledExceptionInnerException()
{
var sequence = new SequenceWithThrowIfCancellationRequested();
await using var ts = new SequenceWithThrowIfCancellationRequested()
.AsTestingSequence();

var result = sequence.Timeout(TimeSpan.FromMilliseconds(0));
var result = ts.Timeout(TimeSpan.FromMilliseconds(0));

var timeoutException = await Assert.ThrowsAsync<TimeoutException>(
async () => await result.Consume());
Expand Down

0 comments on commit c4e9c1b

Please sign in to comment.