Class IndexerConstraint
IndexerConstraint extracts a named property and uses its value as the actual value for a chained constraint.
Inherited Members
Namespace: NUnit.Framework.Constraints
Assembly: nunit.framework.dll
Syntax
public class IndexerConstraint : PrefixConstraint, IConstraint, IResolveConstraint
Constructors
View SourceIndexerConstraint(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. |
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 SourceApplyTo<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
View SourceGetStringRepresentation()
Returns the string representation of the constraint.
Declaration
protected override string GetStringRepresentation()
Returns
Type | Description |
---|---|
string |