Summary
CollectionItemsEqualConstraint is the abstract base class for all
collection constraints that apply some notion of item equality
as a part of their operation.
- Namespace
- TCLite
.Constraints - Interfaces
- Base Types
-
- object
- Constraint
- ConditionConstraint
<IEnumerable> - CollectionConstraint
- Derived Types
graph BT
Type-->Base0["CollectionConstraint"]
click Base0 "/tc-lite/api/TCLite.Constraints/CollectionConstraint"
Base0-->Base1["ConditionConstraint<IEnumerable>"]
Base1-->Base2["Constraint"]
click Base2 "/tc-lite/api/TCLite.Constraints/Constraint"
Base2-->Base3["object"]
Type-.->Interface0["IConstraint"]
click Interface0 "/tc-lite/api/TCLite.Constraints/IConstraint"
Type-.->Interface1["IResolveConstraint"]
click Interface1 "/tc-lite/api/TCLite.Constraints/IResolveConstraint"
Type["CollectionItemsEqualConstraint"]
class Type type-node
Derived0["UniqueItemsConstraint"]-->Type
click Derived0 "/tc-lite/api/TCLite.Constraints/UniqueItemsConstraint"
Derived1["CollectionEquivalentConstraint"]-->Type
click Derived1 "/tc-lite/api/TCLite.Constraints/CollectionEquivalentConstraint"
Syntax
public abstract class CollectionItemsEqualConstraint : CollectionConstraint, IConstraint,
IResolveConstraint
Constructors
Name | Summary |
---|---|
Collection |
Construct an empty CollectionConstraint |
Collection |
Construct a CollectionConstraint |
Properties
Name | Value | Summary |
---|---|---|
And | ConstraintExpression |
Returns a ConstraintExpression by appending And
to the current constraint.
Inherited from Constraint
|
Arguments | object[] |
Arguments provided to this Constraint, for use in
formatting the description.
Inherited from Constraint
|
Builder | ConstraintBuilder |
A ConstraintBuilder holding this constraint. If not null
the constraint is under construction.
Inherited from Constraint
|
Description | string |
The Description of what this constraint tests, for
use in messages and in the ConstraintResult.
Inherited from Constraint
|
DisplayName | string |
The display name of this Constraint for use by ToString().
The default value is the name of the constraint with
trailing "Constraint" removed. Derived classes may set
this to another name in their constructors.
Inherited from Constraint
|
IgnoreCase | Collection |
Flag the constraint to ignore case and return self.
|
IgnoringCase | bool |
Get a flag indicating whether the user requested us to ignore case.
|
Or | ConstraintExpression |
Returns a ConstraintExpression by appending Or
to the current constraint.
Inherited from Constraint
|
Using |
bool |
Get a flag indicating whether any external comparers are in use.
|
With | ConstraintExpression |
Returns a ConstraintExpression by appending And
to the current constraint.
Inherited from Constraint
|
Methods
Name | Value | Summary |
---|---|---|
ApplyConstraint |
ConstraintResult |
Applies the constraint to an ActualValueDelegate that returns
the value to be tested. The default implementation simply evaluates
the delegate but derived classes may override it to provide for
delayed processing.
Inherited from Constraint
|
ApplyConstraint |
ConstraintResult |
Test whether the constraint is satisfied by a given value
Inherited from CollectionConstraint
|
ApplyConstraint |
ConstraintResult |
Test whether the constraint is satisfied by a given reference.
The default implementation simply dereferences the value but
derived classes may override it to provide for delayed processing.
Inherited from Constraint
|
ApplyTo |
ConstraintResult |
Validates the ActualValueDelegate and applies the constraint
to the value it returns.
Inherited from Constraint
|
ApplyTo |
ConstraintResult |
Validates the actual value argument and applies the constraint
to it, returning a ConstraintResult.
Inherited from Constraint
|
ApplyTo |
ConstraintResult |
Validates the actual value argument and applies the constraint
to it, returning a ConstraintResult.
Inherited from Constraint
|
Get |
string |
Returns the string representation of this constraint
Inherited from Constraint
|
IsEmpty |
bool |
Determines whether the specified enumerable is empty.
Inherited from CollectionConstraint
static
|
ItemsEqual |
bool |
Compares two collection members for equality
|
Match |
bool |
Protected method to be implemented by derived classes
Inherited from CollectionConstraint
|
Tally |
CollectionTally |
Return a new CollectionTally for use in making tests
|
ToString |
string |
Default override of ToString returns the constraint DisplayName
followed by any arguments within angle brackets.
Inherited from Constraint
|
Using |
Collection |
Flag the constraint to use the supplied IComparer object.
|
Using |
Collection |
Flag the constraint to use the supplied IEqualityComparer object.
|
Using |
Collection |
Flag the constraint to use the supplied Comparison object.
|
Using |
Collection |
Flag the constraint to use the supplied IComparer object.
|
Using |
Collection |
Flag the constraint to use the supplied IEqualityComparer object.
|
ValidateActualValue |
void |
Inherited from CollectionConstraint
|