Class EndsWithConstraint
EndsWithConstraint can test whether a string ends with an expected substring.
Inherited Members
Namespace: NUnit.Framework.Constraints
Assembly: nunit.framework.dll
Syntax
public class EndsWithConstraint : StringConstraint, IConstraint, IResolveConstraint
Constructors
View SourceEndsWithConstraint(string)
Initializes a new instance of the EndsWithConstraint class.
Declaration
public EndsWithConstraint(string expected)
Parameters
Type | Name | Description |
---|---|---|
string | expected | The expected string |
Methods
View SourceMatches(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.
Declaration
protected override bool Matches(string? actual)
Parameters
Type | Name | Description |
---|---|---|
string | actual |
Returns
Type | Description |
---|---|
bool |