C# Класс Microsoft.Silverlight.Testing.Harness.LogMessageWriter

A utility type that writes new log messages to the test harness log queue.
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
DebugWriteLine ( string text ) : void

This writes a new line of information similar to a Debug::WriteLine call.

Enqueue ( Microsoft.Silverlight.Testing.Harness.LogMessage message ) : void

Posts a log message to the test harness queue for processing.

Environment ( string text ) : void

Writes an environment message.

Error ( string errorMessage ) : void

Log an error message.

Error ( string errorMessage, Exception exception ) : void

Log an error message.

GranularTestStage ( string message, string name, TestGranularity granularity, TestStage stage ) : void

Records a log message that indicates a named, granular test stage has happened.

Information ( string info ) : void

Writes information through a new log message.

KnownIssue ( string issue ) : void

Writes information about an encountered, known issue.

LogMessageWriter ( UnitTestHarness harness ) : System

Initialize a new writer class, using the default LogMessageFactory to create new messages.

LogMessageWriter ( UnitTestHarness harness, Microsoft.Silverlight.Testing.Harness.LogMessageFactory messageFactory ) : System

Initialize a new writer class.

TestExecution ( string text ) : void

Writes a TestRun message.

TestInfrastructure ( string text ) : void

Writes a message relating to the test infrastructure.

TestResult ( string message, TestOutcome outcome ) : void

Record a test outcome.

Warning ( string warningMessage ) : void

Log a warning message.

Warning ( string warningMessage, Exception exception ) : void

Log a warning message.

Защищенные методы

Метод Описание
Create ( ) : Microsoft.Silverlight.Testing.Harness.LogMessage

Creates a new log message using the embedded factory.

Create ( LogMessageType messageType ) : Microsoft.Silverlight.Testing.Harness.LogMessage

Creates a new log message using the embedded factory.

Create ( LogMessageType messageType, string message ) : Microsoft.Silverlight.Testing.Harness.LogMessage

Creates a new log message using the embedded factory.

Decorate ( Microsoft.Silverlight.Testing.Harness.LogMessage message, object key, object value ) : void

Decorate a log message with a value.

DecorateException ( Microsoft.Silverlight.Testing.Harness.LogMessage message, Exception exception ) : void

Decorate the log message object with an Exception object.

DecorateNameProperty ( Microsoft.Silverlight.Testing.Harness.LogMessage message, string name ) : void

Decorate the log message object with a name.

DecorateTestGranularity ( Microsoft.Silverlight.Testing.Harness.LogMessage message, TestGranularity granularity ) : void

Decorate the log message object with a test granularity object.

DecorateTestOutcome ( Microsoft.Silverlight.Testing.Harness.LogMessage message, TestOutcome outcome ) : void

Decorate the log message object with a test outcome object.

DecorateTestStage ( Microsoft.Silverlight.Testing.Harness.LogMessage message, TestStage stage ) : void

Decorate the log message object with a test stage value.

SetType ( Microsoft.Silverlight.Testing.Harness.LogMessage message, LogMessageType type ) : void

Sets the type of the log message.

Описание методов

Create() защищенный Метод

Creates a new log message using the embedded factory.
protected Create ( ) : Microsoft.Silverlight.Testing.Harness.LogMessage
Результат Microsoft.Silverlight.Testing.Harness.LogMessage

Create() защищенный Метод

Creates a new log message using the embedded factory.
protected Create ( LogMessageType messageType ) : Microsoft.Silverlight.Testing.Harness.LogMessage
messageType LogMessageType The message type.
Результат Microsoft.Silverlight.Testing.Harness.LogMessage

Create() защищенный Метод

Creates a new log message using the embedded factory.
protected Create ( LogMessageType messageType, string message ) : Microsoft.Silverlight.Testing.Harness.LogMessage
messageType LogMessageType The message type.
message string The text message.
Результат Microsoft.Silverlight.Testing.Harness.LogMessage

DebugWriteLine() публичный Метод

This writes a new line of information similar to a Debug::WriteLine call.
public DebugWriteLine ( string text ) : void
text string The text to write.
Результат void

Decorate() защищенный статический Метод

Decorate a log message with a value.
protected static Decorate ( Microsoft.Silverlight.Testing.Harness.LogMessage message, object key, object value ) : void
message Microsoft.Silverlight.Testing.Harness.LogMessage The log message to decorate.
key object The key for this decoration.
value object The value of this decoration.
Результат void

DecorateException() защищенный статический Метод

Decorate the log message object with an Exception object.
protected static DecorateException ( Microsoft.Silverlight.Testing.Harness.LogMessage message, Exception exception ) : void
message Microsoft.Silverlight.Testing.Harness.LogMessage The log message object.
exception System.Exception The Exception.
Результат void

DecorateNameProperty() защищенный статический Метод

Decorate the log message object with a name.
protected static DecorateNameProperty ( Microsoft.Silverlight.Testing.Harness.LogMessage message, string name ) : void
message Microsoft.Silverlight.Testing.Harness.LogMessage The log message object.
name string Name property value.
Результат void

DecorateTestGranularity() защищенный статический Метод

Decorate the log message object with a test granularity object.
protected static DecorateTestGranularity ( Microsoft.Silverlight.Testing.Harness.LogMessage message, TestGranularity granularity ) : void
message Microsoft.Silverlight.Testing.Harness.LogMessage The log message object.
granularity TestGranularity Test granularity object.
Результат void

DecorateTestOutcome() защищенный статический Метод

Decorate the log message object with a test outcome object.
protected static DecorateTestOutcome ( Microsoft.Silverlight.Testing.Harness.LogMessage message, TestOutcome outcome ) : void
message Microsoft.Silverlight.Testing.Harness.LogMessage The log message object.
outcome TestOutcome Test outcome object.
Результат void

DecorateTestStage() защищенный статический Метод

Decorate the log message object with a test stage value.
protected static DecorateTestStage ( Microsoft.Silverlight.Testing.Harness.LogMessage message, TestStage stage ) : void
message Microsoft.Silverlight.Testing.Harness.LogMessage The log message object.
stage TestStage Test stage value.
Результат void

Enqueue() публичный Метод

Posts a log message to the test harness queue for processing.
public Enqueue ( Microsoft.Silverlight.Testing.Harness.LogMessage message ) : void
message Microsoft.Silverlight.Testing.Harness.LogMessage The log message object.
Результат void

Environment() публичный Метод

Writes an environment message.
public Environment ( string text ) : void
text string The text to write.
Результат void

Error() публичный Метод

Log an error message.
public Error ( string errorMessage ) : void
errorMessage string The error message string.
Результат void

Error() публичный Метод

Log an error message.
public Error ( string errorMessage, Exception exception ) : void
errorMessage string The error message string.
exception System.Exception The Exception object to decorate the message /// with.
Результат void

GranularTestStage() публичный Метод

Records a log message that indicates a named, granular test stage has happened.
public GranularTestStage ( string message, string name, TestGranularity granularity, TestStage stage ) : void
message string Any message for the log.
name string A name for the object or event.
granularity TestGranularity The test granularity value.
stage TestStage The test stage value.
Результат void

Information() публичный Метод

Writes information through a new log message.
public Information ( string info ) : void
info string The information string.
Результат void

KnownIssue() публичный Метод

Writes information about an encountered, known issue.
public KnownIssue ( string issue ) : void
issue string Information about the known issue.
Результат void

LogMessageWriter() публичный Метод

Initialize a new writer class, using the default LogMessageFactory to create new messages.
public LogMessageWriter ( UnitTestHarness harness ) : System
harness UnitTestHarness The test harness instance.
Результат System

LogMessageWriter() публичный Метод

Initialize a new writer class.
public LogMessageWriter ( UnitTestHarness harness, Microsoft.Silverlight.Testing.Harness.LogMessageFactory messageFactory ) : System
harness UnitTestHarness The test harness instance.
messageFactory Microsoft.Silverlight.Testing.Harness.LogMessageFactory /// The factory to use when creating new messages. ///
Результат System

SetType() защищенный статический Метод

Sets the type of the log message.
protected static SetType ( Microsoft.Silverlight.Testing.Harness.LogMessage message, LogMessageType type ) : void
message Microsoft.Silverlight.Testing.Harness.LogMessage The log message object.
type LogMessageType The new value to set the message type to.
Результат void

TestExecution() публичный Метод

Writes a TestRun message.
public TestExecution ( string text ) : void
text string The text to write.
Результат void

TestInfrastructure() публичный Метод

Writes a message relating to the test infrastructure.
public TestInfrastructure ( string text ) : void
text string The text to write.
Результат void

TestResult() публичный Метод

Record a test outcome.
public TestResult ( string message, TestOutcome outcome ) : void
message string The accompanying message.
outcome TestOutcome The outcome value.
Результат void

Warning() публичный Метод

Log a warning message.
public Warning ( string warningMessage ) : void
warningMessage string The warning message string.
Результат void

Warning() публичный Метод

Log a warning message.
public Warning ( string warningMessage, Exception exception ) : void
warningMessage string The warning message string.
exception System.Exception The Exception object to decorate the message /// with.
Результат void