<PackageReference Include="NUnit" Version="4.3.0" />

NotConstraint

NotConstraint negates the effect of some other constraint
using System.Runtime.CompilerServices; namespace NUnit.Framework.Constraints { [NullableContext(1)] [Nullable(0)] public class NotConstraint : PrefixConstraint { public NotConstraint(IConstraint baseConstraint) : base(baseConstraint, "not") { } public override ConstraintResult ApplyTo<[Nullable(2)] TActual>(TActual actual) { ConstraintResult constraintResult = base.BaseConstraint.ApplyTo(actual); return new ConstraintResult(this, constraintResult.ActualValue, !constraintResult.IsSuccess); } } }