IGLib  1.7.2
The IGLib base library EXTENDED - with other lilbraries and applications.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros
NUnit.Framework.Constraints.CollectionOrderedConstraint Class Reference

CollectionOrderedConstraint is used to test whether a collection is ordered. More...

+ Inheritance diagram for NUnit.Framework.Constraints.CollectionOrderedConstraint:
+ Collaboration diagram for NUnit.Framework.Constraints.CollectionOrderedConstraint:

Public Member Functions

 CollectionOrderedConstraint ()
 Construct a CollectionOrderedConstraint More...
 
CollectionOrderedConstraint Using (IComparer comparer)
 Modifies the constraint to use an IComparer and returns self. More...
 
CollectionOrderedConstraint Using< T > (IComparer< T > comparer)
 Modifies the constraint to use an IComparer{T} and returns self. More...
 
CollectionOrderedConstraint Using< T > (Comparison< T > comparer)
 Modifies the constraint to use a Comparison{T} and returns self. More...
 
CollectionOrderedConstraint By (string propertyName)
 Modifies the constraint to test ordering by the value of a specified property and returns self. More...
 
- Public Member Functions inherited from NUnit.Framework.Constraints.CollectionConstraint
override ConstraintResult ApplyTo< TActual > (TActual actual)
 Test whether the constraint is satisfied by a given value More...
 
- Public Member Functions inherited from NUnit.Framework.Constraints.Constraint
virtual ConstraintResult ApplyTo< TActual > (ActualValueDelegate< TActual > del)
 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. More...
 
virtual ConstraintResult ApplyTo< TActual > (ref TActual actual)
 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. More...
 
override string ToString ()
 Default override of ToString returns the constraint DisplayName followed by any arguments within angle brackets. More...
 
DelayedConstraint After (int delayInMilliseconds)
 Returns a DelayedConstraint with the specified delay time. More...
 
DelayedConstraint After (int delayInMilliseconds, int pollingInterval)
 Returns a DelayedConstraint with the specified delay time and polling interval. More...
 

Protected Member Functions

override bool Matches (IEnumerable actual)
 Test whether the collection is ordered More...
 
override string GetStringRepresentation ()
 Returns the string representation of the constraint. More...
 
- Protected Member Functions inherited from NUnit.Framework.Constraints.CollectionConstraint
 CollectionConstraint ()
 Construct an empty CollectionConstraint More...
 
 CollectionConstraint (object arg)
 Construct a CollectionConstraint More...
 
- Protected Member Functions inherited from NUnit.Framework.Constraints.Constraint
 Constraint (params object[] args)
 Construct a constraint with optional arguments More...
 

Properties

CollectionOrderedConstraint Descending [get]
 
override string Description [get]
 The Description of what this constraint tests, for use in messages and in the ConstraintResult. More...
 
- Properties inherited from NUnit.Framework.Constraints.Constraint
string DisplayName [get, protected set]
 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. More...
 
virtual string Description [get, protected set]
 The Description of what this constraint tests, for use in messages and in the ConstraintResult. More...
 
object[] Arguments [get, private set]
 Arguments provided to this Constraint, for use in formatting the description. More...
 
ConstraintBuilder Builder [get, set]
 The ConstraintBuilder holding this constraint More...
 
ConstraintExpression And [get]
 Returns a ConstraintExpression by appending And to the current constraint. More...
 
ConstraintExpression With [get]
 Returns a ConstraintExpression by appending And to the current constraint. More...
 
ConstraintExpression Or [get]
 Returns a ConstraintExpression by appending Or to the current constraint. More...
 
- Properties inherited from NUnit.Framework.Constraints.IConstraint
string DisplayName [get]
 The display name of this Constraint for use by ToString(). More...
 
string Description [get]
 The Description of what this constraint tests, for use in messages and in the ConstraintResult. More...
 
object[] Arguments [get]
 Arguments provided to this Constraint, for use in formatting the description. More...
 
ConstraintBuilder Builder [get, set]
 The ConstraintBuilder holding this constraint More...
 

Private Attributes

ComparisonAdapter comparer = ComparisonAdapter.Default
 
string comparerName
 
string propertyName
 
bool descending
 

Additional Inherited Members

- Static Public Member Functions inherited from NUnit.Framework.Constraints.Constraint
static Constraint operator& (Constraint left, Constraint right)
 This operator creates a constraint that is satisfied only if both argument constraints are satisfied. More...
 
static Constraint operator| (Constraint left, Constraint right)
 This operator creates a constraint that is satisfied if either of the argument constraints is satisfied. More...
 
static Constraint operator! (Constraint constraint)
 This operator creates a constraint that is satisfied if the argument constraint is not satisfied. More...
 
- Static Protected Member Functions inherited from NUnit.Framework.Constraints.CollectionConstraint
static bool IsEmpty (IEnumerable enumerable)
 Determines whether the specified enumerable is empty. More...
 

Detailed Description

CollectionOrderedConstraint is used to test whether a collection is ordered.

Constructor & Destructor Documentation

NUnit.Framework.Constraints.CollectionOrderedConstraint.CollectionOrderedConstraint ( )
inline

Construct a CollectionOrderedConstraint

summary> If used performs a reverse comparison /summary>

Member Function Documentation

CollectionOrderedConstraint NUnit.Framework.Constraints.CollectionOrderedConstraint.Using ( IComparer  comparer)
inline

Modifies the constraint to use an IComparer and returns self.

References NUnit.Framework.Constraints.ComparisonAdapter.For().

Referenced by NUnit.Framework.CollectionAssert.IsOrdered().

Modifies the constraint to use an IComparer{T} and returns self.

References NUnit.Framework.Constraints.ComparisonAdapter.For().

Modifies the constraint to use a Comparison{T} and returns self.

References NUnit.Framework.Constraints.ComparisonAdapter.For().

CollectionOrderedConstraint NUnit.Framework.Constraints.CollectionOrderedConstraint.By ( string  propertyName)
inline

Modifies the constraint to test ordering by the value of a specified property and returns self.

override bool NUnit.Framework.Constraints.CollectionOrderedConstraint.Matches ( IEnumerable  actual)
inlineprotectedvirtual

Test whether the collection is ordered

Parameters
actual
Returns

Implements NUnit.Framework.Constraints.CollectionConstraint.

References NUnit.Framework.Constraints.ComparisonAdapter.Compare().

override string NUnit.Framework.Constraints.CollectionOrderedConstraint.GetStringRepresentation ( )
inlineprotectedvirtual

Returns the string representation of the constraint.

Returns

Reimplemented from NUnit.Framework.Constraints.Constraint.

Member Data Documentation

ComparisonAdapter NUnit.Framework.Constraints.CollectionOrderedConstraint.comparer = ComparisonAdapter.Default
private
string NUnit.Framework.Constraints.CollectionOrderedConstraint.comparerName
private
string NUnit.Framework.Constraints.CollectionOrderedConstraint.propertyName
private
bool NUnit.Framework.Constraints.CollectionOrderedConstraint.descending
private

Property Documentation

CollectionOrderedConstraint NUnit.Framework.Constraints.CollectionOrderedConstraint.Descending
get
override string NUnit.Framework.Constraints.CollectionOrderedConstraint.Description
get

The Description of what this constraint tests, for use in messages and in the ConstraintResult.


The documentation for this class was generated from the following file: