Skip to content

Warning CS8620 and CS8619 after update to >= 0.72 #3422

Closed

Description

@volkmnv

One CS8620 wanring from here #3394 was fixed in 0.72 but the second one is still there at 'Assert.That(value)'

[Test]
[MethodDataSource(nameof(Data))]
public async Task Test(object? value, object? expected)
{
    await Assert.That(value).IsEqualTo(expected);
}

also an additional CS8619 appeared in this test at 'MethodToTest(data!)':

    [Test]
    [MethodDataSource(nameof(Data))]
    public async Task Test(object? data)
    {
        await Assert.That(() => MethodToTest(data!)).Throws<ArgumentException>();

        Task<object> MethodToTest(object value)
        {
            if (value is null)
                throw new ArgumentNullException(nameof(value));
            return Task.FromResult(new object());
        }
    }

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions