Skip to content

Strange null reference after updating to v4.3.0 #4903

@rudfoss-rr

Description

@rudfoss-rr

I have a very strange problem that I can't seem to figure out. I have a very simple test that worked fine in NUnit v3.14 (original) and in v4.2.2, but when I updated to v4.3.0 it suddenly fails with an actual value that is null.

  public void SupportsSubscopes()
  {
    var scope = PermissionScope.New("app");
    Assert.That(scope, Is.Not.Null);
    var expected = PermissionScope.New("app");
    Assert.That(expected, Is.Not.Null);
    Assert.That(scope, Is.EqualTo(expected));
}

image

If I debug the test and evaluate equality explicitly it is true, but the Assert.That line throws.

image

What could be the problem here? The code looks fine to me, but it seems that NUnit looses track of the actual value at some point. Could this be a bug in NUnit? I've reverted to 4.2.2 and it works fine.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions