Search Results for

    Show / Hide Table of Contents

    Class IndexerConstraint

    IndexerConstraint extracts a named property and uses its value as the actual value for a chained constraint.

    Inheritance
    object
    Constraint
    PrefixConstraint
    IndexerConstraint
    Implements
    IConstraint
    IResolveConstraint
    Inherited Members
    PrefixConstraint.BaseConstraint
    PrefixConstraint.DescriptionPrefix
    PrefixConstraint.Description
    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.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 IndexerConstraint : PrefixConstraint, IConstraint, IResolveConstraint

    Constructors

    View Source

    IndexerConstraint(IEnumerable<object>, IConstraint)

    Initializes a new instance of the IndexerConstraint class.

    Declaration
    public IndexerConstraint(IEnumerable<object> indexerArguments, IConstraint baseConstraint)
    Parameters
    Type Name Description
    IEnumerable<object> indexerArguments

    The argument list for the indexer.

    IConstraint baseConstraint

    The constraint to apply to the indexer.

    View Source

    IndexerConstraint(object[], IConstraint)

    Initializes a new instance of the IndexerConstraint class.

    Declaration
    public IndexerConstraint(object[] indexerArguments, IConstraint baseConstraint)
    Parameters
    Type Name Description
    object[] indexerArguments

    The argument list for the indexer.

    IConstraint baseConstraint

    The constraint to apply to the indexer.

    Methods

    View Source

    ApplyTo<TActual>(TActual)

    Test whether the constraint is satisfied by a given value

    Declaration
    public override ConstraintResult ApplyTo<TActual>(TActual actual)
    Parameters
    Type Name Description
    TActual actual

    The value to be tested

    Returns
    Type Description
    ConstraintResult
    Type Parameters
    Name Description
    TActual
    Overrides
    Constraint.ApplyTo<TActual>(TActual)
    View Source

    GetStringRepresentation()

    Returns the string representation of the constraint.

    Declaration
    protected override string GetStringRepresentation()
    Returns
    Type Description
    string
    Overrides
    Constraint.GetStringRepresentation()

    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