MessageWriter
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.
Abstract method to get the max line length
protected MessageWriter()
Construct a MessageWriter given a culture
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.
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.
Display Expected and Actual lines for given _values, including
a tolerance value on the Expected line.
public 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.
Writes the text for an actual value.
Writes the text for a collection value,
starting at a particular point, to a max length
Method to write single line message with optional args, usually
written to precede the general failure message.
Method to write single line message with optional args, usually
written to precede the general failure message, at a givel
indentation level.
Writes the text for a generalized value.