<PackageReference Include="NUnit" Version="4.4.0-beta.1" />

EqualConstraint<T>

public class EqualConstraint<T> : EqualConstraint
EqualConstraint is able to compare an actual value with the expected value provided in its constructor. Two objects are considered equal if both are null, or if both have the same value. NUnit has special semantics for some object types.
using System; using System.Runtime.CompilerServices; namespace NUnit.Framework.Constraints { [NullableContext(2)] [Nullable(0)] public class EqualConstraint<T> : EqualConstraint { public EqualConstraint(object expected) : base(expected) { } [NullableContext(1)] public EqualConstraint UsingPropertiesComparer(Func<PropertiesComparerConfiguration<T>, PropertiesComparerConfiguration<T>> configure) { base.Comparer.CompareProperties = true; base.Comparer.ComparePropertiesConfiguration = configure(new PropertiesComparerConfiguration<T>()); return this; } } }