C# Class Microsoft.Silverlight.Testing.Harness.VisualStudioLogProvider.Writer

A log provider that outputs in a simple custom test format that Visual Studio recognizes. This is a simple, subset writer.
显示文件 Open project: garyjohnson/wpnest

Public Methods

Method Description
AddPendingErrorMessage ( string message ) : void

Adds an error message to the next result to be processed.

AddPendingException ( Exception e ) : void

Adds an Exception to the next result to be processed.

AddPendingWriteLine ( string line ) : void

Adds a WriteLine to the next result to be processed.

AddTestMethodResult ( ITestMethod test, string storage, string codeBase, string adapterTypeName, string className, string testListName, string computerName, System.DateTime startTime, System.DateTime endTime, TestOutcome outcome ) : void

Adds the result of a test method into the log.

GetXmlAsString ( ) : string

Returns the XML log file as a string.

IncrementResults ( TestOutcome outcome ) : void

Increment the number of passing results.

Writer ( ) : System

Initializes a new Writer object.

Private Methods

Method Description
AddPendingOutput ( SimpleXElement element ) : void

Adds pending output for the next result.

CreateElement ( string name ) : SimpleXElement

Creates a new XElement within the results XML namespace.

CreateInitialDocument ( ) : void

Creates the initial results document and its XElements.

FinalizeContent ( ) : void

Stores property values in the respective elements, clears any lookup dictionaries.

GetTestListGuid ( string testListName ) : string

Returns the GUID for a test list name. The result is stored in memory.

ToDateString ( System.DateTime dateTime ) : string

Returns a string value of the DateTime object.

Method Details

AddPendingErrorMessage() public method

Adds an error message to the next result to be processed.
public AddPendingErrorMessage ( string message ) : void
message string The message.
return void

AddPendingException() public method

Adds an Exception to the next result to be processed.
public AddPendingException ( Exception e ) : void
e System.Exception The Exception object.
return void

AddPendingWriteLine() public method

Adds a WriteLine to the next result to be processed.
public AddPendingWriteLine ( string line ) : void
line string The text to output.
return void

AddTestMethodResult() public method

Adds the result of a test method into the log.
public AddTestMethodResult ( ITestMethod test, string storage, string codeBase, string adapterTypeName, string className, string testListName, string computerName, System.DateTime startTime, System.DateTime endTime, TestOutcome outcome ) : void
test ITestMethod The test metadata.
storage string The storage value.
codeBase string The code base value.
adapterTypeName string The adapter type name.
className string The class name.
testListName string The test list name.
computerName string The computer name.
startTime System.DateTime The start time.
endTime System.DateTime The end time.
outcome TestOutcome The outcome.
return void

GetXmlAsString() public method

Returns the XML log file as a string.
public GetXmlAsString ( ) : string
return string

IncrementResults() public method

Increment the number of passing results.
public IncrementResults ( TestOutcome outcome ) : void
outcome TestOutcome The test outcome.
return void

Writer() public method

Initializes a new Writer object.
public Writer ( ) : System
return System