IGLib
1.7.2
The IGLib base library EXTENDED - with other lilbraries and applications.
|
MessageWriter is the abstract base for classes that write constraint descriptions and messages in some form. The class has separate methods for writing various components of a message, allowing implementations to tailor the presentation as needed. More...
Public Member Functions | |
void | WriteMessageLine (string message, params object[] args) |
Method to write single line message with optional args, usually written to precede the general failure message. More... | |
abstract void | WriteMessageLine (int level, string message, params object[] args) |
Method to write single line message with optional args, usually written to precede the general failure message, at a givel indentation level. More... | |
abstract void | DisplayDifferences (ConstraintResult result) |
Display Expected and Actual lines for a constraint. This is called by MessageWriter's default implementation of WriteMessageTo and provides the generic two-line display. More... | |
abstract void | DisplayDifferences (object expected, object actual) |
Display Expected and Actual lines for given _values. This method may be called by constraints that need more control over the display of actual and expected _values than is provided by the default implementation. More... | |
abstract void | DisplayDifferences (object expected, object actual, Tolerance tolerance) |
Display Expected and Actual lines for given _values, including a tolerance value on the Expected line. More... | |
abstract void | DisplayStringDifferences (string expected, string actual, int mismatch, bool ignoreCase, bool clipping) |
Display the expected and actual string _values on separate lines. If the mismatch parameter is >=0, an additional line is displayed line containing a caret that points to the mismatch point. More... | |
abstract void | WriteActualValue (object actual) |
Writes the text for an actual value. More... | |
abstract void | WriteValue (object val) |
Writes the text for a generalized value. More... | |
abstract void | WriteCollectionElements (IEnumerable collection, long start, int max) |
Writes the text for a collection value, starting at a particular point, to a max length More... | |
Protected Member Functions | |
MessageWriter () | |
Construct a MessageWriter given a culture More... | |
Properties | |
abstract int | MaxLineLength [get, set] |
Abstract method to get the max line length More... | |
MessageWriter is the abstract base for classes that write constraint descriptions and messages in some form. The class has separate methods for writing various components of a message, allowing implementations to tailor the presentation as needed.
|
inlineprotected |
Construct a MessageWriter given a culture
|
inline |
Method to write single line message with optional args, usually written to precede the general failure message.
message | The message to be written |
args | Any arguments used in formatting the message |
Referenced by NUnit.Framework.Constraints.EqualConstraintResult.DisplayFailurePoint(), NUnit.Framework.Constraints.EqualConstraintResult.DisplayStreamDifferences(), NUnit.Framework.Constraints.EqualConstraintResult.DisplayStringDifferences(), and NUnit.Framework.Constraints.EqualConstraintResult.DisplayTypesAndSizes().
|
pure virtual |
Method to write single line message with optional args, usually written to precede the general failure message, at a givel indentation level.
level | The indentation level of the message |
message | The message to be written |
args | Any arguments used in formatting the message |
Implemented in NUnit.Framework.Internal.TextMessageWriter.
|
pure virtual |
Display Expected and Actual lines for a constraint. This is called by MessageWriter's default implementation of WriteMessageTo and provides the generic two-line display.
result | The failing constraint result |
Implemented in NUnit.Framework.Internal.TextMessageWriter.
Referenced by NUnit.Framework.Constraints.EqualConstraintResult.DisplayDifferences(), and NUnit.Framework.Constraints.ConstraintResult.WriteMessageTo().
|
pure virtual |
Display Expected and Actual lines for given _values. This method may be called by constraints that need more control over the display of actual and expected _values than is provided by the default implementation.
expected | The expected value |
actual | The actual value causing the failure |
Implemented in NUnit.Framework.Internal.TextMessageWriter.
|
pure virtual |
Display Expected and Actual lines for given _values, including a tolerance value on the Expected line.
expected | The expected value |
actual | The actual value causing the failure |
tolerance | The tolerance within which the test was made |
Implemented in NUnit.Framework.Internal.TextMessageWriter.
|
pure virtual |
Display the expected and actual string _values on separate lines. If the mismatch parameter is >=0, an additional line is displayed line containing a caret that points to the mismatch point.
expected | The expected string value |
actual | The actual string value |
mismatch | The point at which the strings don't match or -1 |
ignoreCase | If true, case is ignored in locating the point where the strings differ |
clipping | If true, the strings should be clipped to fit the line |
Implemented in NUnit.Framework.Internal.TextMessageWriter.
Referenced by NUnit.Framework.Constraints.EqualConstraintResult.DisplayStringDifferences().
|
pure virtual |
Writes the text for an actual value.
actual | The actual value. |
Implemented in NUnit.Framework.Internal.TextMessageWriter.
Referenced by NUnit.Framework.Constraints.ExceptionTypeConstraint.ExceptionTypeConstraintResult.WriteActualValueTo(), and NUnit.Framework.Constraints.ConstraintResult.WriteActualValueTo().
|
pure virtual |
Writes the text for a generalized value.
val | The value. |
Implemented in NUnit.Framework.Internal.TextMessageWriter.
|
pure virtual |
Writes the text for a collection value, starting at a particular point, to a max length
collection | The collection containing elements to write. |
start | The starting point of the elements to write |
max | The maximum number of elements to write |
Implemented in NUnit.Framework.Internal.TextMessageWriter.
|
getset |
Abstract method to get the max line length