Class StartsWithConstraint
- Namespace
- NUnit.Framework.Constraints
- Assembly
- nunit.framework.dll
StartsWithConstraint can test whether a string starts with an expected substring.
public class StartsWithConstraint : StringConstraint, IConstraint, IResolveConstraint
- Inheritance
-
StartsWithConstraint
- Implements
- Inherited Members
Constructors
StartsWithConstraint(string)
Initializes a new instance of the StartsWithConstraint class.
public StartsWithConstraint(string expected)
Parameters
expected
stringThe expected string
Methods
Matches(string)
Test whether the constraint is matched by the actual value. This is a template method, which calls the IsMatch method of the derived class.
protected override bool Matches(string actual)
Parameters
actual
string