IGLib  1.7.2
The IGLib base library EXTENDED - with other lilbraries and applications.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros
NUnit.Engine.Internal.ResultHelper Class Reference

ResultHelper provides static methods for working with TestEngineResults to wrap, combiner and aggregate them in various ways. More...

Static Public Member Functions

static TestEngineResult Aggregate (this TestEngineResult result, string elementName, string suiteType, string name, string fullName)
 Aggregate the XmlNodes under a TestEngineResult into a single XmlNode. More...
 
static TestEngineResult Aggregate (this TestEngineResult result, string elementName, string name, string fullName)
 Aggregate the XmlNodes under a TestEngineResult into a single XmlNode. More...
 
static TestEngineResult MakePackageResult (this TestEngineResult result, string name, string fullName)
 Aggregate all the separate assembly results of a project as a single node. More...
 
static TestEngineResult Merge (IList< TestEngineResult > results)
 Merges multiple test engine results into a single result. The result element contains all the XML nodes found in the input. More...
 
static XmlNode Aggregate (string elementName, string name, string fullName, IList< XmlNode > resultNodes)
 Aggregates a collection of XmlNodes under a single XmlNode. More...
 
static XmlNode Aggregate (string elementName, string testType, string name, string fullName, IList< XmlNode > resultNodes)
 Aggregates a collection of XmlNodes under a single XmlNode. More...
 

Private Attributes

const string TEST_SUITE_ELEMENT = "test-suite"
 
const string PROJECT_SUITE_TYPE = "Project"
 

Detailed Description

ResultHelper provides static methods for working with TestEngineResults to wrap, combiner and aggregate them in various ways.

Member Function Documentation

static TestEngineResult NUnit.Engine.Internal.ResultHelper.Aggregate ( this TestEngineResult  result,
string  elementName,
string  suiteType,
string  name,
string  fullName 
)
inlinestatic

Aggregate the XmlNodes under a TestEngineResult into a single XmlNode.

Parameters
resultA new TestEngineResult with xml nodes for each assembly or project.
elementNameThe root node name under which to aggregate the nodes.
suiteTypeThe suite type to associate with the TestEngineResult.
nameThe name of the TestEngineResult.
fullNameThe full name of the TestEngineResult.
Returns
A TestEngineResult with a single top-level element.

References NUnit.Engine.TestEngineResult.XmlNodes.

Referenced by NUnit.Engine.Internal.Tests.ResultHelperTests.AggregateXmlNodes().

static TestEngineResult NUnit.Engine.Internal.ResultHelper.Aggregate ( this TestEngineResult  result,
string  elementName,
string  name,
string  fullName 
)
inlinestatic

Aggregate the XmlNodes under a TestEngineResult into a single XmlNode.

Parameters
resultA new TestEngineResult with xml nodes for each assembly or project.
elementNameThe root node name under which to aggregate the results.
nameThe name of the TestEngineResult.
fullNameThe full name of the TestEngineResult.
Returns
A TestEngineResult with a single top-level element.

References NUnit.Engine.TestEngineResult.XmlNodes.

static TestEngineResult NUnit.Engine.Internal.ResultHelper.MakePackageResult ( this TestEngineResult  result,
string  name,
string  fullName 
)
inlinestatic

Aggregate all the separate assembly results of a project as a single node.

Parameters
resultA new TestEngineResult with xml nodes for each assembly or project.
nameThe name of the TestEngineResult.
fullNameThe full name of the TestEngineResult.
Returns
A TestEngineResult with a single top-level element.
static TestEngineResult NUnit.Engine.Internal.ResultHelper.Merge ( IList< TestEngineResult results)
inlinestatic

Merges multiple test engine results into a single result. The result element contains all the XML nodes found in the input.

Parameters
resultsA collection of TestEngineResult to merge.
Returns
A TestEngineResult merging all the input results.

Used by AbstractTestRunner MakePackageResult method.

References NUnit.Engine.TestEngineResult.XmlNodes.

Referenced by NUnit.Engine.Runners.AggregatingTestRunner.ExploreTests(), NUnit.Engine.Runners.AggregatingTestRunner.LoadPackage(), NUnit.Engine.Internal.Tests.ResultHelperTests.MergeAndAggregateTestResults(), NUnit.Engine.Internal.Tests.ResultHelperTests.MergeTestResults(), and NUnit.Engine.Runners.AggregatingTestRunner.RunTests().

static XmlNode NUnit.Engine.Internal.ResultHelper.Aggregate ( string  elementName,
string  name,
string  fullName,
IList< XmlNode >  resultNodes 
)
inlinestatic

Aggregates a collection of XmlNodes under a single XmlNode.

Parameters
elementNameThe root node name under which to aggregate the results.
nameThe name to associated with the root node.
fullNameThe full name to associated with the root node.
resultNodesA collection of XmlNodes to aggregate
Returns
A single XmlNode containing the aggregated list of XmlNodes.
static XmlNode NUnit.Engine.Internal.ResultHelper.Aggregate ( string  elementName,
string  testType,
string  name,
string  fullName,
IList< XmlNode >  resultNodes 
)
inlinestatic

Aggregates a collection of XmlNodes under a single XmlNode.

Parameters
elementNameThe root node name under which to aggregate the results.
testTypeThe type to associated with the root node.
nameThe name to associated with the root node.
fullNameThe full name to associated with the root node.
resultNodesA collection of XmlNodes to aggregate
Returns
A single XmlNode containing the aggregated list of XmlNodes.

Member Data Documentation

const string NUnit.Engine.Internal.ResultHelper.TEST_SUITE_ELEMENT = "test-suite"
private
const string NUnit.Engine.Internal.ResultHelper.PROJECT_SUITE_TYPE = "Project"
private

The documentation for this class was generated from the following file: