The EqualConstraintResult class is tailored for formatting and displaying the result of an EqualConstraint.
More...
|
void | DisplayDifferences (MessageWriter writer, object expected, object actual, int depth) |
|
void | DisplayStringDifferences (MessageWriter writer, string expected, string actual) |
|
void | DisplayStreamDifferences (MessageWriter writer, Stream expected, Stream actual, int depth) |
|
void | DisplayCollectionDifferences (MessageWriter writer, ICollection expected, ICollection actual, int depth) |
| Display the failure information for two collections that did not match. More...
|
|
void | DisplayTypesAndSizes (MessageWriter writer, IEnumerable expected, IEnumerable actual, int indent) |
| Displays a single line showing the types and sizes of the expected and actual collections or arrays. If both are identical, the value is only shown once. More...
|
|
void | DisplayFailurePoint (MessageWriter writer, IEnumerable expected, IEnumerable actual, NUnitEqualityComparer.FailurePoint failurePoint, int indent) |
| Displays a single line showing the point in the expected and actual arrays at which the comparison failed. If the arrays have different structures or dimensions, both _values are shown. More...
|
|
void | DisplayEnumerableDifferences (MessageWriter writer, IEnumerable expected, IEnumerable actual, int depth) |
| Display the failure information for two IEnumerables that did not match. More...
|
|
|
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...
|
|
The EqualConstraintResult class is tailored for formatting and displaying the result of an EqualConstraint.
NUnit.Framework.Constraints.EqualConstraintResult.EqualConstraintResult |
( |
EqualConstraint |
constraint, |
|
|
object |
actual, |
|
|
bool |
hasSucceeded |
|
) |
| |
|
inline |
override void NUnit.Framework.Constraints.EqualConstraintResult.WriteMessageTo |
( |
MessageWriter |
writer | ) |
|
|
inlinevirtual |
void NUnit.Framework.Constraints.EqualConstraintResult.DisplayDifferences |
( |
MessageWriter |
writer, |
|
|
object |
expected, |
|
|
object |
actual, |
|
|
int |
depth |
|
) |
| |
|
inlineprivate |
void NUnit.Framework.Constraints.EqualConstraintResult.DisplayStringDifferences |
( |
MessageWriter |
writer, |
|
|
string |
expected, |
|
|
string |
actual |
|
) |
| |
|
inlineprivate |
void NUnit.Framework.Constraints.EqualConstraintResult.DisplayStreamDifferences |
( |
MessageWriter |
writer, |
|
|
Stream |
expected, |
|
|
Stream |
actual, |
|
|
int |
depth |
|
) |
| |
|
inlineprivate |
Display the failure information for two collections that did not match.
- Parameters
-
writer | The MessageWriter on which to display |
expected | The expected collection. |
actual | The actual collection |
depth | The depth of this failure in a set of nested collections |
void NUnit.Framework.Constraints.EqualConstraintResult.DisplayTypesAndSizes |
( |
MessageWriter |
writer, |
|
|
IEnumerable |
expected, |
|
|
IEnumerable |
actual, |
|
|
int |
indent |
|
) |
| |
|
inlineprivate |
Displays a single line showing the types and sizes of the expected and actual collections or arrays. If both are identical, the value is only shown once.
- Parameters
-
writer | The MessageWriter on which to display |
expected | The expected collection or array |
actual | The actual collection or array |
indent | The indentation level for the message line |
References NUnit.Framework.Constraints.MessageWriter.WriteMessageLine().
Displays a single line showing the point in the expected and actual arrays at which the comparison failed. If the arrays have different structures or dimensions, both _values are shown.
- Parameters
-
writer | The MessageWriter on which to display |
expected | The expected array |
actual | The actual array |
failurePoint | Index of the failure point in the underlying collections |
indent | The indentation level for the message line |
References NUnit.Framework.Constraints.MessageWriter.WriteMessageLine().
static object NUnit.Framework.Constraints.EqualConstraintResult.GetValueFromCollection |
( |
ICollection |
collection, |
|
|
int |
index |
|
) |
| |
|
inlinestaticprivate |
void NUnit.Framework.Constraints.EqualConstraintResult.DisplayEnumerableDifferences |
( |
MessageWriter |
writer, |
|
|
IEnumerable |
expected, |
|
|
IEnumerable |
actual, |
|
|
int |
depth |
|
) |
| |
|
inlineprivate |
Display the failure information for two IEnumerables that did not match.
- Parameters
-
writer | The MessageWriter on which to display |
expected | The expected enumeration. |
actual | The actual enumeration |
depth | The depth of this failure in a set of nested collections |
object NUnit.Framework.Constraints.EqualConstraintResult.expectedValue |
|
private |
Tolerance NUnit.Framework.Constraints.EqualConstraintResult.tolerance |
|
private |
bool NUnit.Framework.Constraints.EqualConstraintResult.caseInsensitive |
|
private |
bool NUnit.Framework.Constraints.EqualConstraintResult.clipStrings |
|
private |
readonly string NUnit.Framework.Constraints.EqualConstraintResult.StringsDiffer_1 |
|
staticprivate |
Initial value:=
"String lengths are both {0}. Strings differ at index {1}."
readonly string NUnit.Framework.Constraints.EqualConstraintResult.StringsDiffer_2 |
|
staticprivate |
Initial value:=
"Expected string length {0} but was {1}. Strings differ at index {2}."
readonly string NUnit.Framework.Constraints.EqualConstraintResult.StreamsDiffer_1 |
|
staticprivate |
Initial value:=
"Stream lengths are both {0}. Streams differ at offset {1}."
readonly string NUnit.Framework.Constraints.EqualConstraintResult.StreamsDiffer_2 |
|
staticprivate |
Initial value:=
"Expected Stream length {0} but was {1}."
readonly string NUnit.Framework.Constraints.EqualConstraintResult.CollectionType_1 |
|
staticprivate |
Initial value:=
"Expected and actual are both {0}"
readonly string NUnit.Framework.Constraints.EqualConstraintResult.CollectionType_2 |
|
staticprivate |
Initial value:=
"Expected is {0}, actual is {1}"
readonly string NUnit.Framework.Constraints.EqualConstraintResult.ValuesDiffer_1 |
|
staticprivate |
Initial value:=
"Values differ at index {0}"
readonly string NUnit.Framework.Constraints.EqualConstraintResult.ValuesDiffer_2 |
|
staticprivate |
Initial value:=
"Values differ at expected index {0}, actual index {1}"
The documentation for this class was generated from the following file: