Class RegexConstraint
- Namespace
- NUnit.Framework.Constraints
- Assembly
- nunit.framework.dll
RegexConstraint can test whether a string matches the pattern provided.
public class RegexConstraint : StringConstraint, IConstraint, IResolveConstraint
- Inheritance
-
RegexConstraint
- Implements
- Inherited Members
Constructors
RegexConstraint(string)
Initializes a new instance of the RegexConstraint class.
public RegexConstraint(string pattern)
Parameters
pattern
stringThe pattern.
Methods
Matches(string)
Test whether the constraint is satisfied by a given value
protected override bool Matches(string actual)
Parameters
actual
stringThe value to be tested
Returns
- bool
True for success, false for failure