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

WhiteSpaceConstraint

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