Skip to content

Contains lambda not compiling when coupled with IsNotNull #3471

@robertcoltheart

Description

@robertcoltheart

More regressions / defects in assertions.

See test case below:

[Test]
public async Task Test()
{
    var dictionary = new Dictionary<string, string>();

    await Assert.That(dictionary).Contains(x => x.Key == "key"); // Compiles
    await Assert.That(dictionary).IsNotNull().And.Contains(x => x.Key == "key"); // Does not compile
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions