Search Results for

    Show / Hide Table of Contents

    Class PredicateConstraint<T>

    Predicate constraint wraps a Predicate in a constraint, returning success if the predicate is true.

    Inheritance
    object
    Constraint
    PredicateConstraint<T>
    Implements
    IConstraint
    IResolveConstraint
    Inherited Members
    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 PredicateConstraint<T> : Constraint, IConstraint, IResolveConstraint
    Type Parameters
    Name Description
    T

    Constructors

    View Source

    PredicateConstraint(Predicate<T>)

    Construct a PredicateConstraint from a predicate

    Declaration
    public PredicateConstraint(Predicate<T> predicate)
    Parameters
    Type Name Description
    Predicate<T> predicate

    Properties

    View Source

    Description

    Gets text describing a constraint

    Declaration
    public override string Description { get; }
    Property Value
    Type Description
    string
    Overrides
    Constraint.Description

    Methods

    View Source

    ApplyTo<TActual>(TActual)

    Determines whether the predicate succeeds when applied to the actual value.

    Declaration
    public override ConstraintResult ApplyTo<TActual>(TActual actual)
    Parameters
    Type Name Description
    TActual actual
    Returns
    Type Description
    ConstraintResult
    Type Parameters
    Name Description
    TActual
    Overrides
    Constraint.ApplyTo<TActual>(TActual)

    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