Class WhiteSpaceConstraint
WhiteSpaceConstraint tests whether a string contains white space.
Inherited Members
Namespace: NUnit.Framework.Constraints
Assembly: nunit.framework.dll
Syntax
public class WhiteSpaceConstraint : StringConstraint, IConstraint, IResolveConstraint
Constructors
View SourceWhiteSpaceConstraint()
Declaration
public WhiteSpaceConstraint()
Properties
View SourceDescription
The Description of what this constraint tests, for use in messages and in the ConstraintResult.
Declaration
public override string Description { get; }
Property Value
Type | Description |
---|---|
string |
Overrides
View SourceDisplayName
The display name of this Constraint for use by ToString(). The default value is the name of the constraint with trailing "Constraint" removed. Derived classes may set this to another name in their constructors.
Declaration
public override string DisplayName { get; }
Property Value
Type | Description |
---|---|
string |
Overrides
Methods
View SourceMatches(string?)
Test whether the constraint is satisfied by a given value
Declaration
protected override bool Matches(string? actual)
Parameters
Type | Name | Description |
---|---|---|
string | actual | The value to be tested |
Returns
Type | Description |
---|---|
bool | True for success, false for failure |