C# Класс UnityEngine.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
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
DisplayDifferences ( Constraint constraint ) : 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, 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, int start, int max ) : void

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

WriteConnector ( string connector ) : void

Writes the text for a connector.

WriteExpectedValue ( object expected ) : void

Writes the text for an expected value.

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 givel indentation level.

WriteMessageLine ( string message ) : void

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

WriteModifier ( string modifier ) : void

Writes the text for a modifier

WritePredicate ( string predicate ) : void

Writes the text for a predicate.

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 ( Constraint constraint ) : void
constraint Constraint The constraint that failed
Результат 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, Tolerance tolerance ) : void
expected object The expected value
actual object The actual value causing the failure
tolerance 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, int start, int max ) : void
collection IEnumerable The collection containing elements to write.
start int The starting point of the elements to write
max int The maximum number of elements to write
Результат void

WriteConnector() публичный абстрактный Метод

Writes the text for a connector.
public abstract WriteConnector ( string connector ) : void
connector string The connector.
Результат void

WriteExpectedValue() публичный абстрактный Метод

Writes the text for an expected value.
public abstract WriteExpectedValue ( object expected ) : void
expected object The expected value.
Результат void

WriteMessageLine() публичный абстрактный Метод

Method to write single line message with optional args, usually written to precede the general failure message, at a givel 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

WriteModifier() публичный абстрактный Метод

Writes the text for a modifier
public abstract WriteModifier ( string modifier ) : void
modifier string The modifier.
Результат void

WritePredicate() публичный абстрактный Метод

Writes the text for a predicate.
public abstract WritePredicate ( string predicate ) : void
predicate string The predicate.
Результат void

WriteValue() публичный абстрактный Метод

Writes the text for a generalized value.
public abstract WriteValue ( object val ) : void
val object The value.
Результат void