C# 클래스 NUnit.Framework.Constraints.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.
상속: System.IO.StringWriter
파일 보기 프로젝트 열기: nunit/nunit 1 사용 예제들

공개 메소드들

메소드 설명
DisplayDifferences ( NUnit.Framework.Constraints.ConstraintResult result ) : void

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.

DisplayDifferences ( object expected, object actual ) : 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.

DisplayDifferences ( object expected, object actual, NUnit.Framework.Constraints.Tolerance tolerance ) : void

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

DisplayStringDifferences ( string expected, string actual, int mismatch, bool ignoreCase, bool clipping ) : 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 actual ) : void

Writes the text for an actual value.

WriteCollectionElements ( IEnumerable collection, long start, int max ) : void

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

WriteMessageLine ( int level, string message ) : void

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

WriteMessageLine ( string message ) : void

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

WriteValue ( object val ) : void

Writes the text for a generalized value.

보호된 메소드들

메소드 설명
MessageWriter ( ) : System.IO

Construct a MessageWriter given a culture

메소드 상세

DisplayDifferences() 공개 추상적인 메소드

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.
public abstract DisplayDifferences ( NUnit.Framework.Constraints.ConstraintResult result ) : void
result NUnit.Framework.Constraints.ConstraintResult The failing constraint result
리턴 void

DisplayDifferences() 공개 추상적인 메소드

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.
public abstract DisplayDifferences ( object expected, object actual ) : void
expected object The expected value
actual object The actual value causing the failure
리턴 void

DisplayDifferences() 공개 추상적인 메소드

Display Expected and Actual lines for given _values, including a tolerance value on the Expected line.
public abstract DisplayDifferences ( object expected, object actual, NUnit.Framework.Constraints.Tolerance tolerance ) : void
expected object The expected value
actual object The actual value causing the failure
tolerance NUnit.Framework.Constraints.Tolerance The tolerance within which the test was made
리턴 void

DisplayStringDifferences() 공개 추상적인 메소드

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.
public abstract DisplayStringDifferences ( string expected, string actual, int mismatch, bool ignoreCase, bool clipping ) : void
expected string The expected string value
actual string The actual string value
mismatch int The point at which the strings don't match or -1
ignoreCase bool If true, case is ignored in locating the point where the strings differ
clipping bool If true, the strings should be clipped to fit the line
리턴 void

MessageWriter() 보호된 메소드

Construct a MessageWriter given a culture
protected MessageWriter ( ) : System.IO
리턴 System.IO

WriteActualValue() 공개 추상적인 메소드

Writes the text for an actual value.
public abstract WriteActualValue ( object actual ) : void
actual object The actual value.
리턴 void

WriteCollectionElements() 공개 추상적인 메소드

Writes the text for a collection value, starting at a particular point, to a max length
public abstract WriteCollectionElements ( IEnumerable collection, long start, int max ) : void
collection IEnumerable The collection containing elements to write.
start long The starting point of the elements to write
max int The maximum number of elements to write
리턴 void

WriteMessageLine() 공개 추상적인 메소드

Method to write single line message with optional args, usually written to precede the general failure message, at a given indentation level.
public abstract WriteMessageLine ( int level, string message ) : void
level int The indentation level of the message
message string The message to be written
리턴 void

WriteMessageLine() 공개 메소드

Method to write single line message with optional args, usually written to precede the general failure message.
public WriteMessageLine ( string message ) : void
message string The message to be written
리턴 void

WriteValue() 공개 추상적인 메소드

Writes the text for a generalized value.
public abstract WriteValue ( object val ) : void
val object The value.
리턴 void