C# Class MsgPack.TestSummaryReporter

Implements test reporting via dedicated Result object.
Show file Open project: msgpack/msgpack-cli Class Usage Examples

Public Methods

Method Description
FormatMethodName ( string methodName ) : string

Formats the name of the method for reporting.

HandleFatalException ( string stage, Exception exception, Result resultPrefab, GameObject resultVertical ) : void

Handles the fatal exception.

RecordError ( ) : void

Records that an error has been ocurred.

RecordError ( int errorCount ) : void

Records that a critical error has been ocurred and specified tests will be skipped as error.

RecordFailure ( ) : void

Records that last test has been failed.

RecordSkip ( ) : void

Records that last test has been skipped.

RecordSuccess ( ) : void

Records that last test has been succeeded.

SetCurrentTestClassName ( string testClassName ) : void

Sets the name of the current test class.

TestSummaryReporter ( string testClassName, bool isAllRunMode, Result resultPrefab, GameObject resultVertical ) : System

Initializes a new instance of the TestSummaryReporter class.

Private Methods

Method Description
CreateNewResult ( Result resultPrefab, GameObject resultVertical ) : Result

Creates the new Result object.

UpdateResult ( ) : void

Updates the summary Result.

Method Details

FormatMethodName() public method

Formats the name of the method for reporting.
public FormatMethodName ( string methodName ) : string
methodName string Name of the method.
return string

HandleFatalException() public method

Handles the fatal exception.
public HandleFatalException ( string stage, Exception exception, Result resultPrefab, GameObject resultVertical ) : void
stage string The stage of test execution for reporting.
exception System.Exception The fatal exception.
resultPrefab Result The prefab for test result indicators.
resultVertical UnityEngine.GameObject The vertical area which test result indicators to be belonging.
return void

RecordError() public method

Records that an error has been ocurred.
public RecordError ( ) : void
return void

RecordError() public method

Records that a critical error has been ocurred and specified tests will be skipped as error.
public RecordError ( int errorCount ) : void
errorCount int The count of tests will be skipped as error
return void

RecordFailure() public method

Records that last test has been failed.
public RecordFailure ( ) : void
return void

RecordSkip() public method

Records that last test has been skipped.
public RecordSkip ( ) : void
return void

RecordSuccess() public method

Records that last test has been succeeded.
public RecordSuccess ( ) : void
return void

SetCurrentTestClassName() public method

Sets the name of the current test class.
public SetCurrentTestClassName ( string testClassName ) : void
testClassName string Name of the test class.
return void

TestSummaryReporter() public method

Initializes a new instance of the TestSummaryReporter class.
public TestSummaryReporter ( string testClassName, bool isAllRunMode, Result resultPrefab, GameObject resultVertical ) : System
testClassName string Name of the test class.
isAllRunMode bool true if the summary reporting is in context of all-run mode..
resultPrefab Result The prefab for test result indicators.
resultVertical UnityEngine.GameObject The vertical area which test result indicators to be belonging.
return System