C# Class Microsoft.Silverlight.Testing.Harness.LogMessageWriter

A utility type that writes new log messages to the test harness log queue.
Afficher le fichier Open project: garyjohnson/wpnest Class Usage Examples

Méthodes publiques

Méthode Description
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.

Méthodes protégées

Méthode Description
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.

Method Details

Create() protected méthode

Creates a new log message using the embedded factory.
protected Create ( ) : Microsoft.Silverlight.Testing.Harness.LogMessage
Résultat Microsoft.Silverlight.Testing.Harness.LogMessage

Create() protected méthode

Creates a new log message using the embedded factory.
protected Create ( LogMessageType messageType ) : Microsoft.Silverlight.Testing.Harness.LogMessage
messageType LogMessageType The message type.
Résultat Microsoft.Silverlight.Testing.Harness.LogMessage

Create() protected méthode

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.
Résultat Microsoft.Silverlight.Testing.Harness.LogMessage

DebugWriteLine() public méthode

This writes a new line of information similar to a Debug::WriteLine call.
public DebugWriteLine ( string text ) : void
text string The text to write.
Résultat void

Decorate() protected static méthode

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.
Résultat void

DecorateException() protected static méthode

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.
Résultat void

DecorateNameProperty() protected static méthode

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.
Résultat void

DecorateTestGranularity() protected static méthode

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.
Résultat void

DecorateTestOutcome() protected static méthode

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.
Résultat void

DecorateTestStage() protected static méthode

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.
Résultat void

Enqueue() public méthode

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.
Résultat void

Environment() public méthode

Writes an environment message.
public Environment ( string text ) : void
text string The text to write.
Résultat void

Error() public méthode

Log an error message.
public Error ( string errorMessage ) : void
errorMessage string The error message string.
Résultat void

Error() public méthode

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.
Résultat void

GranularTestStage() public méthode

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.
Résultat void

Information() public méthode

Writes information through a new log message.
public Information ( string info ) : void
info string The information string.
Résultat void

KnownIssue() public méthode

Writes information about an encountered, known issue.
public KnownIssue ( string issue ) : void
issue string Information about the known issue.
Résultat void

LogMessageWriter() public méthode

Initialize a new writer class, using the default LogMessageFactory to create new messages.
public LogMessageWriter ( UnitTestHarness harness ) : System
harness UnitTestHarness The test harness instance.
Résultat System

LogMessageWriter() public méthode

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. ///
Résultat System

SetType() protected static méthode

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.
Résultat void

TestExecution() public méthode

Writes a TestRun message.
public TestExecution ( string text ) : void
text string The text to write.
Résultat void

TestInfrastructure() public méthode

Writes a message relating to the test infrastructure.
public TestInfrastructure ( string text ) : void
text string The text to write.
Résultat void

TestResult() public méthode

Record a test outcome.
public TestResult ( string message, TestOutcome outcome ) : void
message string The accompanying message.
outcome TestOutcome The outcome value.
Résultat void

Warning() public méthode

Log a warning message.
public Warning ( string warningMessage ) : void
warningMessage string The warning message string.
Résultat void

Warning() public méthode

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.
Résultat void