Skip to content

Assert.That methods should autogenerate message, if null #4413

Description

@FrankDzaebel

if we use something like: Assert.That(actualBool, Is.EqualTo(expectedBool)); in NUnit version: 3.13.3.0
when they do not match we get the output:

  Expected: True
  But was:  False

With the new CallerArgumentExpressionAttribute it would be easy to get:

  actualBool
  Expected: True
  But was:  False

This would be easier to understand in unit tests. ... and extremly easy to implement.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions