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

Contain the result of matching a Constraint against an actual value. More...

+ Inheritance diagram for NUnit.Framework.Constraints.ConstraintResult:

Public Member Functions

 ConstraintResult (IConstraint constraint, object actualValue)
 Constructs a ConstraintResult for a particular Constraint. More...
 
 ConstraintResult (IConstraint constraint, object actualValue, ConstraintStatus status)
 Constructs a ConstraintResult for a particular Constraint. More...
 
 ConstraintResult (IConstraint constraint, object actualValue, bool isSuccess)
 Constructs a ConstraintResult for a particular Constraint. More...
 
virtual void WriteMessageTo (MessageWriter writer)
 Write the failure message to the MessageWriter provided as an argument. The default implementation simply passes the result and the actual value to the writer, which then displays the constraint description and the value. More...
 
virtual void WriteActualValueTo (MessageWriter writer)
 Write the actual value for a failing constraint test to a MessageWriter. The default implementation simply writes the raw value of actual, leaving it to the writer to perform any formatting. More...
 

Properties

object ActualValue [get, private set]
 The actual value that was passed to the Constraint.ApplyTo{TActual}(TActual) method. More...
 
ConstraintStatus Status [get, set]
 Gets and sets the ResultStatus for this result. More...
 
virtual bool IsSuccess [get]
 True if actual value meets the Constraint criteria otherwise false. More...
 
string Name [get, private set]
 Display friendly name of the constraint. More...
 
string Description [get, private set]
 Description of the constraint may be affected by the state the constraint had when Constraint.ApplyTo{TActual}(TActual) was performed against the actual value. More...
 

Detailed Description

Contain the result of matching a Constraint against an actual value.

Constructor & Destructor Documentation

NUnit.Framework.Constraints.ConstraintResult.ConstraintResult ( IConstraint  constraint,
object  actualValue 
)
inline

Constructs a ConstraintResult for a particular Constraint.

Parameters
constraintThe Constraint to which this result applies.
actualValueThe actual value to which the Constraint was applied.

References NUnit.Framework.Constraints.IConstraint.Description, and NUnit.Framework.Constraints.IConstraint.DisplayName.

NUnit.Framework.Constraints.ConstraintResult.ConstraintResult ( IConstraint  constraint,
object  actualValue,
ConstraintStatus  status 
)
inline

Constructs a ConstraintResult for a particular Constraint.

Parameters
constraintThe Constraint to which this result applies.
actualValueThe actual value to which the Constraint was applied.
statusThe status of the new ConstraintResult.
NUnit.Framework.Constraints.ConstraintResult.ConstraintResult ( IConstraint  constraint,
object  actualValue,
bool  isSuccess 
)
inline

Constructs a ConstraintResult for a particular Constraint.

Parameters
constraintThe Constraint to which this result applies.
actualValueThe actual value to which the Constraint was applied.
isSuccessIf true, applies a status of Success to the result, otherwise Failure.

Member Function Documentation

virtual void NUnit.Framework.Constraints.ConstraintResult.WriteMessageTo ( MessageWriter  writer)
inlinevirtual

Write the failure message to the MessageWriter provided as an argument. The default implementation simply passes the result and the actual value to the writer, which then displays the constraint description and the value.

Constraints that need to provide additional details, such as where the error occured can override this.

Parameters
writerThe MessageWriter on which to display the message

Reimplemented in NUnit.Framework.Constraints.EqualConstraintResult.

References NUnit.Framework.Constraints.MessageWriter.DisplayDifferences().

virtual void NUnit.Framework.Constraints.ConstraintResult.WriteActualValueTo ( MessageWriter  writer)
inlinevirtual

Property Documentation

object NUnit.Framework.Constraints.ConstraintResult.ActualValue
getprivate set

The actual value that was passed to the Constraint.ApplyTo{TActual}(TActual) method.

ConstraintStatus NUnit.Framework.Constraints.ConstraintResult.Status
getset

Gets and sets the ResultStatus for this result.

Referenced by NUnit.Framework.Constraints.AttributeExistsConstraint.ApplyTo< TActual >().

string NUnit.Framework.Constraints.ConstraintResult.Name
getprivate set

Display friendly name of the constraint.

string NUnit.Framework.Constraints.ConstraintResult.Description
getprivate set

Description of the constraint may be affected by the state the constraint had when Constraint.ApplyTo{TActual}(TActual) was performed against the actual value.


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