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

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

Public Methods

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

Protected Methods

Method 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 method

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

Create() protected method

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

Create() protected method

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.
return Microsoft.Silverlight.Testing.Harness.LogMessage

DebugWriteLine() public method

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

Decorate() protected static method

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

DecorateException() protected static method

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

DecorateNameProperty() protected static method

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

DecorateTestGranularity() protected static method

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

DecorateTestOutcome() protected static method

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

DecorateTestStage() protected static method

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

Enqueue() public method

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

Environment() public method

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

Error() public method

Log an error message.
public Error ( string errorMessage ) : void
errorMessage string The error message string.
return void

Error() public method

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

GranularTestStage() public method

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

Information() public method

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

KnownIssue() public method

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

LogMessageWriter() public method

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

LogMessageWriter() public method

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. ///
return System

SetType() protected static method

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

TestExecution() public method

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

TestInfrastructure() public method

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

TestResult() public method

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

Warning() public method

Log a warning message.
public Warning ( string warningMessage ) : void
warningMessage string The warning message string.
return void

Warning() public method

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