Class IndexerConstraint
- Namespace
- NUnit.Framework.Constraints
- Assembly
- nunit.framework.dll
IndexerConstraint extracts a named property and uses its value as the actual value for a chained constraint.
public class IndexerConstraint : PrefixConstraint, IConstraint, IResolveConstraint
- Inheritance
-
IndexerConstraint
- Implements
- Inherited Members
Constructors
IndexerConstraint(IEnumerable<object>, IConstraint)
Initializes a new instance of the IndexerConstraint class.
public IndexerConstraint(IEnumerable<object> indexerArguments, IConstraint baseConstraint)
Parameters
indexerArguments
IEnumerable<object>The argument list for the indexer.
baseConstraint
IConstraintThe constraint to apply to the indexer.
IndexerConstraint(object[], IConstraint)
Initializes a new instance of the IndexerConstraint class.
public IndexerConstraint(object[] indexerArguments, IConstraint baseConstraint)
Parameters
indexerArguments
object[]The argument list for the indexer.
baseConstraint
IConstraintThe constraint to apply to the indexer.
Methods
ApplyTo<TActual>(TActual)
Test whether the constraint is satisfied by a given value
public override ConstraintResult ApplyTo<TActual>(TActual actual)
Parameters
actual
TActualThe value to be tested
Returns
Type Parameters
TActual
GetStringRepresentation()
Returns the string representation of the constraint.
protected override string GetStringRepresentation()