IGLib
1.7.2
The IGLib base library EXTENDED - with other lilbraries and applications.
|
Wrapper class for the xml-formatted results produced by the test engine for most operations. The XML is stored as a string in order to allow serialization and actual XmlNodes are created on demand. More...
Public Member Functions | |
TestEngineResult (XmlNode xml) | |
Construct a TestResult from an XmlNode More... | |
TestEngineResult (string xml) | |
Construct a test from a string holding xml More... | |
TestEngineResult () | |
Default constructor used when adding multiple results More... | |
void | Add (string xml) |
void | Add (XmlNode xml) |
Properties | |
bool | IsSingle [get] |
Gets a flag indicating whether this is a single result having only one XmlNode associated with it. More... | |
IList< XmlNode > | XmlNodes [get] |
Gets the xml representing a test result as an XmlNode More... | |
XmlNode | Xml [get] |
Gets the XML representing a single test result. More... | |
Private Attributes | |
List< string > | _xmlText = new List<string>() |
List< XmlNode > | _xmlNodes = new List<XmlNode>() |
Wrapper class for the xml-formatted results produced by the test engine for most operations. The XML is stored as a string in order to allow serialization and actual XmlNodes are created on demand.
In principal, there should only be one XmlNode in a result. However, as work progresses, there may temporarily be multiple nodes, which have not yet been aggregated under a higher level suite. For that reason, TestEngineResult maintains a list of XmlNodes and another of the corresponding text.
Static methods are provided for aggregating the internal XmlNodes into a single node as well as for combining multiple TestEngineResults into one.
|
inline |
Construct a TestResult from an XmlNode
xml | An XmlNode representing the result |
|
inline |
Construct a test from a string holding xml
xml | A string containing the xml result |
|
inline |
Default constructor used when adding multiple results
|
inline |
Referenced by NUnit.Engine.Runners.AggregatingTestRunner.ExploreTests().
|
inline |
|
private |
|
private |
|
get |
Gets a flag indicating whether this is a single result having only one XmlNode associated with it.
Referenced by NUnit.Engine.Internal.Tests.ResultHelperTests.AggregateTestResult(), NUnit.Engine.Tests.TestEngineResultTests.CanCreateFromXmlNode(), NUnit.Engine.Tests.TestEngineResultTests.CanCreateFromXmlString(), and NUnit.Engine.Internal.Tests.ResultHelperTests.MergeAndAggregateTestResults().
|
get |
Gets the xml representing a test result as an XmlNode
Referenced by NUnit.Engine.Internal.ResultHelper.Aggregate(), NUnit.Engine.Internal.ResultHelper.Merge(), and NUnit.Engine.Internal.Tests.ResultHelperTests.MergeTestResults().
|
get |
Gets the XML representing a single test result.
InvalidOperationException | If the result is empty or has multiple XML nodes. |
Referenced by NUnit.Engine.Internal.Tests.ResultHelperTests.AggregateTestResult(), NUnit.Engine.Tests.TestEngineResultTests.CanCreateFromXmlNode(), NUnit.Engine.Tests.TestEngineResultTests.CanCreateFromXmlString(), NUnit.Engine.Internal.Tests.ResultHelperTests.MergeAndAggregateTestResults(), NUnit.Engine.Tests.AsyncTestEngineResultTests.Result_ThrowsIfNotSet(), NUnit.Engine.Runners.MasterTestRunner.RunTests(), NUnit.Engine.Internal.Tests.ResultHelperTests.SetUp(), and NUnit.Engine.Tests.AsyncTestEngineResultTests.Wait_ReturnsFalseTillTestCompletes().