-
-
Notifications
You must be signed in to change notification settings - Fork 96
Closed
Description
Assert.ThrowsAsync(Func<Task>) seems faulty:
static Task DoesNotThrow() => Task.CompletedTask;
[Test]
public async Task TUnit_Assert_ThrowsAsync()
{
await DoesNotThrow(); // fine
await Assert.ThrowsAsync(DoesNotThrow); // no exception, test passes!
await Assert.ThrowsAsync(() => DoesNotThrow()); // no exception, test passes!
await Assert.ThrowsAsync(async () => await DoesNotThrow()); // no exception, test passes!
}Metadata
Metadata
Assignees
Labels
No labels