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

WhiteSpaceConstraint

WhiteSpaceConstraint tests whether a string contains white space.
using System.Runtime.CompilerServices; namespace NUnit.Framework.Constraints { [System.Runtime.CompilerServices.NullableContext(1)] [System.Runtime.CompilerServices.Nullable(0)] public class WhiteSpaceConstraint : StringConstraint { private const string WhiteSpace = "white-space"; public override string Description => "white-space"; public override string DisplayName => "white-space"; [System.Runtime.CompilerServices.NullableContext(2)] protected override bool Matches(string actual) { return string.IsNullOrWhiteSpace(actual); } } }