Skip to content

NUnit2044 false-positive on explicit delegate type #410

@yaakov-h

Description

@yaakov-h
TestDelegate action = resourceStreams.Commit;
Assert.That(action, Throws.InvalidOperationException.With.Message.EqualTo("The unit of work is read-only."));

This triggers NUnit2044:The type of the actual argument must be a delegate.

In this case, the type already is a delegate, as resourceStreams.Commit is a method defined as public void Commit().

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions