Skip to content

Commit

Permalink
fix: removed unneeded test
Browse files Browse the repository at this point in the history
  • Loading branch information
egil committed Aug 21, 2023
1 parent 14678df commit 760431d
Showing 1 changed file with 1 addition and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,26 +19,6 @@ private static async Task<string> DelayedStringTask(TimeProvider provider)
return StringTaskResult;
}

public static TheoryData<Func<ManualTimeProvider, Task>> NullTaskInvalidInvocations { get; } =
new TheoryData<Func<ManualTimeProvider, Task>>
{
sut => default(Task)!.WaitAsync(TimeSpan.FromSeconds(1), sut),
sut => default(Task)!.WaitAsync(TimeSpan.FromSeconds(1), sut, CancellationToken.None),
sut => default(Task<string>)!.WaitAsync(TimeSpan.FromSeconds(1), sut),
sut => default(Task<string>)!.WaitAsync(TimeSpan.FromSeconds(1), sut, CancellationToken.None),
};

[Theory(Skip = "Not implemented in Microsofts implementation"), MemberData(nameof(NullTaskInvalidInvocations))]
public async Task WaitAsync_task_input_validation(Func<ManualTimeProvider, Task> invalidInvocation)
{
var sut = new ManualTimeProvider();

await sut.Invoking(invalidInvocation)
.Should()
.ThrowAsync<ArgumentNullException>()
.WithParameterName("task");
}

public static TheoryData<Func<ManualTimeProvider, Task>> TimeoutInvalidInvocations { get; } =
new TheoryData<Func<ManualTimeProvider, Task>>
{
Expand Down Expand Up @@ -109,7 +89,7 @@ public void WaitAsync_canceled_immediately_when_cancellationToken_is_set(Func<Ma
sut => DelayedStringTask(sut).WaitAsync(TimeSpan.Zero, sut, CancellationToken.None),
};

[Theory(Skip = "Not implemented in Microsofts implementation"), MemberData(nameof(ImmediateTimedoutInvocations))]
[Theory, MemberData(nameof(ImmediateTimedoutInvocations))]
public async Task WaitAsync_throws_immediately_when_timeout_is_zero(Func<ManualTimeProvider, Task> immediateTimedoutInvocation)
{
var sut = new ManualTimeProvider();
Expand Down

0 comments on commit 760431d

Please sign in to comment.