IGLib  1.7.2
The IGLib base library EXTENDED - with other lilbraries and applications.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros
NUnit.Framework.Constraints.MessageWriter Class Referenceabstract

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...

+ Inheritance diagram for NUnit.Framework.Constraints.MessageWriter:
+ Collaboration diagram for NUnit.Framework.Constraints.MessageWriter:

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...
 

Detailed Description

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.

Constructor & Destructor Documentation

NUnit.Framework.Constraints.MessageWriter.MessageWriter ( )
inlineprotected

Construct a MessageWriter given a culture

Member Function Documentation

void NUnit.Framework.Constraints.MessageWriter.WriteMessageLine ( string  message,
params object[]  args 
)
inline

Method to write single line message with optional args, usually written to precede the general failure message.

Parameters
messageThe message to be written
argsAny 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().

abstract void NUnit.Framework.Constraints.MessageWriter.WriteMessageLine ( int  level,
string  message,
params object[]  args 
)
pure virtual

Method to write single line message with optional args, usually written to precede the general failure message, at a givel indentation level.

Parameters
levelThe indentation level of the message
messageThe message to be written
argsAny arguments used in formatting the message

Implemented in NUnit.Framework.Internal.TextMessageWriter.

abstract void NUnit.Framework.Constraints.MessageWriter.DisplayDifferences ( ConstraintResult  result)
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.

Parameters
resultThe failing constraint result

Implemented in NUnit.Framework.Internal.TextMessageWriter.

Referenced by NUnit.Framework.Constraints.EqualConstraintResult.DisplayDifferences(), and NUnit.Framework.Constraints.ConstraintResult.WriteMessageTo().

abstract void NUnit.Framework.Constraints.MessageWriter.DisplayDifferences ( object  expected,
object  actual 
)
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.

Parameters
expectedThe expected value
actualThe actual value causing the failure

Implemented in NUnit.Framework.Internal.TextMessageWriter.

abstract void NUnit.Framework.Constraints.MessageWriter.DisplayDifferences ( object  expected,
object  actual,
Tolerance  tolerance 
)
pure virtual

Display Expected and Actual lines for given _values, including a tolerance value on the Expected line.

Parameters
expectedThe expected value
actualThe actual value causing the failure
toleranceThe tolerance within which the test was made

Implemented in NUnit.Framework.Internal.TextMessageWriter.

abstract void NUnit.Framework.Constraints.MessageWriter.DisplayStringDifferences ( string  expected,
string  actual,
int  mismatch,
bool  ignoreCase,
bool  clipping 
)
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.

Parameters
expectedThe expected string value
actualThe actual string value
mismatchThe point at which the strings don't match or -1
ignoreCaseIf true, case is ignored in locating the point where the strings differ
clippingIf true, the strings should be clipped to fit the line

Implemented in NUnit.Framework.Internal.TextMessageWriter.

Referenced by NUnit.Framework.Constraints.EqualConstraintResult.DisplayStringDifferences().

abstract void NUnit.Framework.Constraints.MessageWriter.WriteActualValue ( object  actual)
pure virtual
abstract void NUnit.Framework.Constraints.MessageWriter.WriteValue ( object  val)
pure virtual

Writes the text for a generalized value.

Parameters
valThe value.

Implemented in NUnit.Framework.Internal.TextMessageWriter.

abstract void NUnit.Framework.Constraints.MessageWriter.WriteCollectionElements ( IEnumerable  collection,
long  start,
int  max 
)
pure virtual

Writes the text for a collection value, starting at a particular point, to a max length

Parameters
collectionThe collection containing elements to write.
startThe starting point of the elements to write
maxThe maximum number of elements to write

Implemented in NUnit.Framework.Internal.TextMessageWriter.

Property Documentation

abstract int NUnit.Framework.Constraints.MessageWriter.MaxLineLength
getset

Abstract method to get the max line length


The documentation for this class was generated from the following file: