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

Add support for Assert.MultipleAsync #615

Closed
manfred-brands opened this issue Oct 19, 2023 · 1 comment · Fixed by #642
Closed

Add support for Assert.MultipleAsync #615

manfred-brands opened this issue Oct 19, 2023 · 1 comment · Fixed by #642

Comments

@manfred-brands
Copy link
Member

This is mainly for detecting suppressing dereferencing possible null values.

@MaceWindu
Copy link

Looks like this is related:

[Test]
public async ValueTask TestAsync()
{
    await Assert.MultipleAsync(async () =>
    {
        // NUnit2045: add Assert.Multiple
        Assert.That(await Get1(), Is.Not.Null);
        Assert.That(await Get2(), Is.Not.Null);
    });
}

private static ValueTask<string?> Get1() => ValueTask.FromResult((string?)"");
private static ValueTask<string?> Get2() => ValueTask.FromResult((string?)"");

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants