Search Results for

    Show / Hide Table of Contents

    Class EndsWithConstraint

    EndsWithConstraint can test whether a string ends with an expected substring.

    Inheritance
    object
    Constraint
    StringConstraint
    EndsWithConstraint
    Implements
    IConstraint
    IResolveConstraint
    Inherited Members
    StringConstraint.expected
    StringConstraint.caseInsensitive
    StringConstraint.descriptionText
    StringConstraint.ApplyTo<TActual>(TActual)
    StringConstraint.Description
    StringConstraint.IgnoreCase
    Constraint.ApplyTo<TActual>(ActualValueDelegate<TActual>)
    Constraint.ApplyTo<TActual>(ref TActual)
    Constraint.ApplyToAsync<TActual>(Func<Task<TActual>>)
    Constraint.GetTestObject<TActual>(ActualValueDelegate<TActual>)
    Constraint.ToString()
    Constraint.GetStringRepresentation(IEnumerable)
    Constraint.GetStringRepresentation()
    Constraint.After(int)
    Constraint.After(int, int)
    Constraint.DisplayName
    Constraint.Arguments
    Constraint.Builder
    Constraint.And
    Constraint.With
    Constraint.Or
    object.GetType()
    object.MemberwiseClone()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    Namespace: NUnit.Framework.Constraints
    Assembly: nunit.framework.dll
    Syntax
    public class EndsWithConstraint : StringConstraint, IConstraint, IResolveConstraint

    Constructors

    View Source

    EndsWithConstraint(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 Source

    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.

    Declaration
    protected override bool Matches(string? actual)
    Parameters
    Type Name Description
    string actual
    Returns
    Type Description
    bool
    Overrides
    StringConstraint.Matches(string?)

    Implements

    IConstraint
    IResolveConstraint
    • View Source
    In this article
    Back to top Generated by DocFX | Copyright (c) 2018- The NUnit Project - Licensed under CC BY-NC-SA 4.0