IGLib
1.7.2
The IGLib base library EXTENDED - with other lilbraries and applications.
|
Contain the result of matching a Constraint against an actual value. More...
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... | |
Contain the result of matching a Constraint against an actual value.
|
inline |
Constructs a ConstraintResult for a particular Constraint.
constraint | The Constraint to which this result applies. |
actualValue | The actual value to which the Constraint was applied. |
References NUnit.Framework.Constraints.IConstraint.Description, and NUnit.Framework.Constraints.IConstraint.DisplayName.
|
inline |
Constructs a ConstraintResult for a particular Constraint.
constraint | The Constraint to which this result applies. |
actualValue | The actual value to which the Constraint was applied. |
status | The status of the new ConstraintResult. |
|
inline |
Constructs a ConstraintResult for a particular Constraint.
constraint | The Constraint to which this result applies. |
actualValue | The actual value to which the Constraint was applied. |
isSuccess | If true, applies a status of Success to the result, otherwise Failure. |
|
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.
writer | The MessageWriter on which to display the message |
Reimplemented in NUnit.Framework.Constraints.EqualConstraintResult.
References NUnit.Framework.Constraints.MessageWriter.DisplayDifferences().
|
inlinevirtual |
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.
writer | The writer on which the actual value is displayed |
Reimplemented in NUnit.Framework.Constraints.ThrowsConstraint.ThrowsConstraintResult, NUnit.Framework.Constraints.AndConstraint.AndConstraintResult, NUnit.Framework.Constraints.ThrowsExceptionConstraint.ThrowsExceptionConstraintResult, and NUnit.Framework.Constraints.ExceptionTypeConstraint.ExceptionTypeConstraintResult.
References NUnit.Framework.Constraints.MessageWriter.WriteActualValue().
Referenced by NUnit.Framework.Internal.TextMessageWriter.WriteActualLine(), and NUnit.Framework.Constraints.AndConstraint.AndConstraintResult.WriteActualValueTo().
|
getprivate set |
The actual value that was passed to the Constraint.ApplyTo{TActual}(TActual) method.
|
getset |
Gets and sets the ResultStatus for this result.
Referenced by NUnit.Framework.Constraints.AttributeExistsConstraint.ApplyTo< TActual >().
|
get |
True if actual value meets the Constraint criteria otherwise false.
Referenced by NUnit.Framework.Constraints.DelayedConstraint.ApplyTo< TActual >(), NUnit.Framework.Constraints.ThrowsConstraint.ThrowsConstraintResult.ThrowsConstraintResult(), and NUnit.Framework.Constraints.AndConstraint.AndConstraintResult.WriteActualValueTo().
|
getprivate set |
Display friendly name of the constraint.
|
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.