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.DelayedConstraint Class Reference

Applies a delay to the match so that a match can be evaluated in the future. /summary> More...

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

Public Member Functions

 DelayedConstraint (IConstraint baseConstraint, int delayInMilliseconds)
 
 DelayedConstraint (IConstraint baseConstraint, int delayInMilliseconds, int pollingInterval)
 
override ConstraintResult ApplyTo< TActual > (TActual actual)
 Test whether the constraint is satisfied by a given value More...
 
override ConstraintResult ApplyTo< TActual > (ActualValueDelegate< TActual > del)
 Test whether the constraint is satisfied by a delegate More...
 
override ConstraintResult ApplyTo< TActual > (ref TActual actual)
 Test whether the constraint is satisfied by a given reference. Overridden to wait for the specified delay period before calling the base constraint with the dereferenced value. More...
 
- Public Member Functions inherited from NUnit.Framework.Constraints.Constraint
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 string GetStringRepresentation ()
 Returns the string representation of the constraint. More...
 
- Protected Member Functions inherited from NUnit.Framework.Constraints.PrefixConstraint
 PrefixConstraint (IResolveConstraint baseConstraint)
 Construct given a base constraint More...
 
- Protected Member Functions inherited from NUnit.Framework.Constraints.Constraint
 Constraint (params object[] args)
 Construct a constraint with optional arguments More...
 

Properties

override string Description [get]
 Gets text describing a constraint More...
 
- Properties inherited from NUnit.Framework.Constraints.PrefixConstraint
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...
 

Static Private Member Functions

static object InvokeDelegate< T > (ActualValueDelegate< T > del)
 
static long TimestampOffset (long timestamp, TimeSpan offset)
 Adjusts a Timestamp by a given TimeSpan More...
 
static TimeSpan TimestampDiff (long timestamp1, long timestamp2)
 Returns the difference between two Timestamps as a TimeSpan More...
 

Private Attributes

readonly int delayInMilliseconds
 
readonly int pollingInterval
 

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...
 
- Protected Attributes inherited from NUnit.Framework.Constraints.PrefixConstraint
IConstraint baseConstraint
 The base constraint More...
 
string descriptionPrefix
 Prefix used in forming the constraint description More...
 

Detailed Description

Applies a delay to the match so that a match can be evaluated in the future. /summary>

Constructor & Destructor Documentation

NUnit.Framework.Constraints.DelayedConstraint.DelayedConstraint ( IConstraint  baseConstraint,
int  delayInMilliseconds 
)
inline

summary> Creates a new DelayedConstraint /summary> param name="baseConstraint">The inner constraint to decorate

param name="delayInMilliseconds">The time interval after which the match is performed, in milliseconds

param name="pollingInterval">The time interval used for polling, in milliseconds

exception cref="InvalidOperationException">If the value of delayInMilliseconds is less than 0

NUnit.Framework.Constraints.DelayedConstraint.DelayedConstraint ( IConstraint  baseConstraint,
int  delayInMilliseconds,
int  pollingInterval 
)
inline

Member Function Documentation

override ConstraintResult NUnit.Framework.Constraints.DelayedConstraint.ApplyTo< TActual > ( TActual  actual)
inlinevirtual

Test whether the constraint is satisfied by a given value

Parameters
actualThe value to be tested
Returns
True for if the base constraint fails, false if it succeeds

Implements NUnit.Framework.Constraints.Constraint.

override ConstraintResult NUnit.Framework.Constraints.DelayedConstraint.ApplyTo< TActual > ( ActualValueDelegate< TActual >  del)
inlinevirtual

Test whether the constraint is satisfied by a delegate

Parameters
delThe delegate whose value is to be tested
Returns
A ConstraintResult

Reimplemented from NUnit.Framework.Constraints.Constraint.

References NUnit.Framework.Constraints.ConstraintResult.IsSuccess.

static object NUnit.Framework.Constraints.DelayedConstraint.InvokeDelegate< T > ( ActualValueDelegate< T >  del)
inlinestaticprivate
override ConstraintResult NUnit.Framework.Constraints.DelayedConstraint.ApplyTo< TActual > ( ref TActual  actual)
inlinevirtual

Test whether the constraint is satisfied by a given reference. Overridden to wait for the specified delay period before calling the base constraint with the dereferenced value.

Parameters
actualA reference to the value to be tested
Returns
True for success, false for failure

Reimplemented from NUnit.Framework.Constraints.Constraint.

References NUnit.Framework.Constraints.ConstraintResult.IsSuccess.

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

Returns the string representation of the constraint.

Reimplemented from NUnit.Framework.Constraints.Constraint.

static long NUnit.Framework.Constraints.DelayedConstraint.TimestampOffset ( long  timestamp,
TimeSpan  offset 
)
inlinestaticprivate

Adjusts a Timestamp by a given TimeSpan

Parameters
timestamp
offset
Returns
static TimeSpan NUnit.Framework.Constraints.DelayedConstraint.TimestampDiff ( long  timestamp1,
long  timestamp2 
)
inlinestaticprivate

Returns the difference between two Timestamps as a TimeSpan

Parameters
timestamp1
timestamp2
Returns

Member Data Documentation

readonly int NUnit.Framework.Constraints.DelayedConstraint.delayInMilliseconds
private
readonly int NUnit.Framework.Constraints.DelayedConstraint.pollingInterval
private

summary> Creates a new DelayedConstraint /summary> param name="baseConstraint">The inner constraint to decorate

param name="delayInMilliseconds">The time interval after which the match is performed

exception cref="InvalidOperationException">If the value of delayInMilliseconds is less than 0

Property Documentation

override string NUnit.Framework.Constraints.DelayedConstraint.Description
get

Gets text describing a constraint


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