MessageWriter Class

Summary

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.
Namespace
TCLite.Constraints
Base Types
  • StringWriter
graph BT Type-->Base0["StringWriter"] Type["MessageWriter"] class Type type-node

Syntax

public abstract class MessageWriter : StringWriter

Constructors

Name Summary
MessageWriter() Construct a MessageWriter given a culture

Properties

Name Value Summary
MaxLineLength int
Abstract method to get the max line length

Methods

Name Value Summary
DisplayDifferences(object, object, Tolerance) void
Display Expected and Actual lines for given values, including a tolerance value on the Expected line.
DisplayDifferences(object, object) void
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.
DisplayStringDifferences(string, string, int, bool, bool) void
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.
WriteActualValue(object) void
Writes the text for an actual value.
WriteExpectedValue(object) void
Writes the text for an expected value.
WriteMessageLine(int, string, object[]) void
Method to write single line message with optional args, usually written to precede the general failure message, at a givel indentation level.
WriteMessageLine(string, object[]) void
Method to write single line message with optional args, usually written to precede the general failure message.