IGLib
1.7.2
The IGLib base library EXTENDED - with other lilbraries and applications.
|
TNode represents a single node in the XML representation of a Test or TestResult. It replaces System.Xml.XmlNode and System.Xml.Linq.XElement, providing a minimal set of methods for operating on the XML in a platform-independent manner. More...
Classes | |
class | NodeFilter |
Public Member Functions | |
TNode (string name) | |
Constructs a new instance of TNode More... | |
TNode (string name, string value) | |
Constructs a new instance of TNode with a value More... | |
TNode (string name, string value, bool valueIsCDATA) | |
Constructs a new instance of TNode with a value More... | |
TNode | AddElement (string name) |
Adds a new element as a child of the current node and returns it. More... | |
TNode | AddElement (string name, string value) |
Adds a new element with a value as a child of the current node and returns it. More... | |
TNode | AddElementWithCDATA (string name, string value) |
Adds a new element with a value as a child of the current node and returns it. The value will be output using a CDATA section. More... | |
void | AddAttribute (string name, string value) |
Adds an attribute with a specified name and value to the XmlNode. More... | |
TNode | SelectSingleNode (string xpath) |
Finds a single descendant of this node matching an xpath specification. The format of the specification is limited to what is needed by NUnit and its tests. More... | |
NodeList | SelectNodes (string xpath) |
Finds all descendants of this node matching an xpath specification. The format of the specification is limited to what is needed by NUnit and its tests. More... | |
void | WriteTo (XmlWriter writer) |
Writes the XML representation of the node to an XmlWriter More... | |
Static Public Member Functions | |
static TNode | FromXml (string xmlText) |
Create a TNode from it's XML text representation More... | |
Properties | |
string | Name [get, private set] |
Gets the name of the node More... | |
string | Value [get, set] |
Gets the value of the node More... | |
bool | ValueIsCDATA [get, private set] |
Gets a flag indicating whether the value should be output using CDATA. More... | |
AttributeDictionary | Attributes [get, private set] |
Gets the dictionary of attributes More... | |
NodeList | ChildNodes [get, private set] |
Gets a list of child nodes More... | |
TNode | FirstChild [get] |
Gets the first ChildNode More... | |
string | OuterXml [get] |
Gets the XML representation of this node. More... | |
Private Member Functions | |
void | WriteCDataTo (XmlWriter writer) |
Static Private Member Functions | |
static TNode | FromXml (XmlNode xmlNode) |
static NodeList | ApplySelection (NodeList nodeList, string xpath) |
static string | EscapeInvalidXmlCharacters (string str) |
static string | CharToUnicodeSequence (char symbol) |
TNode represents a single node in the XML representation of a Test or TestResult. It replaces System.Xml.XmlNode and System.Xml.Linq.XElement, providing a minimal set of methods for operating on the XML in a platform-independent manner.
|
inline |
Constructs a new instance of TNode
name | The name of the node |
|
inline |
Constructs a new instance of TNode with a value
name | The name of the node |
value | The text content of the node |
|
inline |
Constructs a new instance of TNode with a value
name | The name of the node |
value | The text content of the node |
valueIsCDATA | Flag indicating whether to use CDATA when writing the text |
|
inlinestatic |
Create a TNode from it's XML text representation
xmlText | The XML text to be parsed |
Referenced by NUnitLite.TextRunner.CreateTestFilter(), NUnit.Framework.Api.FrameworkControllerTests.ExploreTestsAction_AfterLoad_ReturnsRunnableSuite(), NUnit.Framework.Api.FrameworkControllerTests.ExploreTestsAction_BadFile_ReturnsNonRunnableSuite(), NUnit.Framework.Api.FrameworkControllerTests.ExploreTestsAction_FileNotFound_ReturnsNonRunnableSuite(), NUnit.Framework.Internal.TestFilter.FromXml(), NUnit.Framework.Api.FrameworkControllerTests.LoadTestsAction_Assembly_ReturnsRunnableSuite(), NUnit.Framework.Api.FrameworkControllerTests.LoadTestsAction_BadFile_ReturnsNonRunnableSuite(), NUnit.Framework.Api.FrameworkControllerTests.LoadTestsAction_FileNotFound_ReturnsNonRunnableSuite(), NUnit.Framework.Api.FrameworkControllerTests.LoadTestsAction_GoodFile_ReturnsRunnableSuite(), NUnit.Framework.Api.FrameworkControllerTests.RunTestsAction_AfterLoad_ReturnsRunnableSuite(), NUnit.Framework.Api.FrameworkControllerTests.RunTestsAction_BadFile_ReturnsNonRunnableSuite(), and NUnit.Framework.Api.FrameworkControllerTests.RunTestsAction_FileNotFound_ReturnsNonRunnableSuite().
|
inline |
Adds a new element as a child of the current node and returns it.
name | The element name. |
Referenced by NUnit.Framework.Internal.TestResult.AddFailureElement(), NUnit.Framework.Internal.TestResult.AddReasonElement(), NUnit.Framework.Internal.Filters.CompositeFilter.AddToXml(), NUnit.Framework.Internal.Filters.ValueMatchFilter.AddToXml(), NUnit.Framework.Internal.Filters.NotFilter.AddToXml(), NUnit.Framework.Internal.TestMethod.AddToXml(), NUnit.Framework.Internal.PropertyBag.AddToXml(), NUnit.Framework.Internal.TestFilter.EmptyFilter.AddToXml(), and NUnit.Framework.Internal.TestSuite.AddToXml().
|
inline |
Adds a new element with a value as a child of the current node and returns it.
name | The element name |
value | The text content of the new element |
|
inline |
Adds a new element with a value as a child of the current node and returns it. The value will be output using a CDATA section.
name | The element name |
value | The text content of the new element |
Referenced by NUnit.Framework.Internal.TestResult.AddFailureElement(), NUnit.Framework.Internal.TestResult.AddOutputElement(), and NUnit.Framework.Internal.TestResult.AddReasonElement().
|
inline |
Adds an attribute with a specified name and value to the XmlNode.
name | The name of the attribute. |
value | The value of the attribute. |
Referenced by NUnit.Framework.Api.FrameworkController.AddSetting(), NUnit.Framework.Internal.Filters.PropertyFilter.AddToXml(), NUnit.Framework.Internal.Filters.ValueMatchFilter.AddToXml(), NUnit.Framework.Internal.TestMethod.AddToXml(), NUnit.Framework.Internal.PropertyBag.AddToXml(), NUnit.Framework.Internal.TestSuite.AddToXml(), NUnit.Framework.Internal.TestResult.AddToXml(), NUnit.Framework.Interfaces.TNode.FromXml(), NUnitLite.NUnit3XmlOutputWriter.MakeTestRunElement(), and NUnit.Framework.Internal.Test.PopulateTestNode().
|
inline |
Finds a single descendant of this node matching an xpath specification. The format of the specification is limited to what is needed by NUnit and its tests.
xpath |
Referenced by NUnit.Framework.Internal.TestResultOutputTests.CanWriteOutputToResult_Multiple_XmlOutput(), NUnit.Framework.Internal.TestResultOutputTests.CanWriteOutputToResult_XmlOutput(), NUnit.Framework.Internal.TestXmlTests.CheckXmlForTest(), NUnit.Framework.Api.FrameworkControllerTests.GetSkipReason(), NUnit.Framework.Internal.TestResultOutputTests.IfNothingIsWritten_XmlOutputIsEmpty(), NUnit.Framework.Internal.TestResultTests.SuiteResultXmlNodeBasicInfo(), NUnit.Framework.Internal.FailedResultTests.SuiteResultXmlNodeIsFailure(), NUnit.Framework.Internal.MixedResultTests.SuiteResultXmlNodeIsFailure(), NUnit.Framework.Internal.TestResultTests.TestResultXmlNodeBasicInfo(), NUnit.Framework.Internal.FailedResultTests.TestResultXmlNodeEscapesInvalidXmlCharacters(), NUnit.Framework.Internal.FailedResultTests.TestResultXmlNodeIsFailure(), NUnit.Framework.Internal.IgnoredResultTests.TestResultXmlNodeIsIgnored(), NUnit.Framework.Internal.InconclusiveResultTests.TestResultXmlNodeIsInconclusive(), NUnit.Framework.Internal.NotRunnableResultTests.TestResultXmlNodeIsNotRunnable(), and NUnit.Framework.Internal.SuccessResultTests.TestResultXmlNodeIsSuccess().
|
inline |
Finds all descendants of this node matching an xpath specification. The format of the specification is limited to what is needed by NUnit and its tests.
Referenced by NUnit.Framework.Internal.MixedResultTests.SuiteResultXmlNodeHasFourChildTests(), NUnit.Framework.Internal.DefaultResultTests.SuiteResultXmlNodeHasOneChildTest(), NUnit.Framework.Internal.SuccessResultTests.SuiteResultXmlNodeHasOneChildTest(), NUnit.Framework.Internal.IgnoredResultTests.SuiteResultXmlNodeHasOneChildTest(), NUnit.Framework.Internal.NotRunnableResultTests.SuiteResultXmlNodeHasOneChildTest(), NUnit.Framework.Internal.FailedResultTests.SuiteResultXmlNodeHasOneChildTest(), NUnit.Framework.Internal.InconclusiveResultTests.SuiteResultXmlNodeHasOneChildTest(), and NUnit.Framework.Internal.TestResultTests.TestResultXmlNodeBasicInfo().
|
inline |
Writes the XML representation of the node to an XmlWriter
writer |
References NUnit.Framework.Interfaces.TNode.WriteTo().
Referenced by NUnitLite.NUnit3XmlOutputWriter.WriteTestFile(), NUnit.Framework.Interfaces.TNode.WriteTo(), and NUnitLite.NUnit3XmlOutputWriter.WriteXmlResultOutput().
|
inlinestaticprivate |
|
inlinestaticprivate |
References NUnit.Framework.Interfaces.TNode.ChildNodes.
|
inlinestaticprivate |
|
inlinestaticprivate |
|
inlineprivate |
|
getprivate set |
Gets the name of the node
Referenced by NUnit.Framework.Internal.TestXmlTests.CheckXmlForTest(), NUnit.Framework.Internal.TestFilter.FromXml(), NUnit.Framework.Interfaces.TNode.NodeFilter.Pass(), NUnit.Framework.Internal.TestResultTests.SuiteResultXmlNodeBasicInfo(), NUnit.Framework.Internal.TestResultTests.TestResultXmlNodeBasicInfo(), and NUnit.Framework.Internal.PropertyBagTests.XmlIsProducedCorrectly().
|
getset |
Gets the value of the node
Referenced by NUnit.Framework.Internal.TestFilter.FromXml(), NUnit.Framework.Internal.FailedResultTests.SuiteResultXmlNodeIsFailure(), NUnit.Framework.Internal.MixedResultTests.SuiteResultXmlNodeIsFailure(), NUnit.Framework.Internal.FailedResultTests.TestResultXmlNodeEscapesInvalidXmlCharacters(), NUnit.Framework.Internal.FailedResultTests.TestResultXmlNodeIsFailure(), NUnit.Framework.Internal.IgnoredResultTests.TestResultXmlNodeIsIgnored(), NUnit.Framework.Internal.InconclusiveResultTests.TestResultXmlNodeIsInconclusive(), NUnit.Framework.Internal.NotRunnableResultTests.TestResultXmlNodeIsNotRunnable(), and NUnit.Framework.Internal.SuccessResultTests.TestResultXmlNodeIsSuccess().
|
getprivate set |
Gets a flag indicating whether the value should be output using CDATA.
|
getprivate set |
Gets the dictionary of attributes
Referenced by NUnit.Framework.Internal.TestXmlTests.CheckXmlForTest(), NUnit.Framework.Internal.TestFilter.FromXml(), NUnit.Framework.Api.FrameworkControllerTests.GetSkipReason(), NUnit.Framework.Interfaces.TNode.NodeFilter.Pass(), NUnit.Framework.Internal.TestResultTests.SuiteResultXmlNodeBasicInfo(), NUnit.Framework.Internal.NotRunnableResultTests.SuiteResultXmlNodeIsFailure(), NUnit.Framework.Internal.FailedResultTests.SuiteResultXmlNodeIsFailure(), NUnit.Framework.Internal.MixedResultTests.SuiteResultXmlNodeIsFailure(), NUnit.Framework.Internal.IgnoredResultTests.SuiteResultXmlNodeIsIgnored(), NUnit.Framework.Internal.DefaultResultTests.SuiteResultXmlNodeIsInconclusive(), NUnit.Framework.Internal.InconclusiveResultTests.SuiteResultXmlNodeIsInconclusive(), NUnit.Framework.Internal.SuccessResultTests.SuiteResultXmlNodeIsSuccess(), NUnit.Framework.Internal.TestResultTests.TestResultXmlNodeBasicInfo(), NUnit.Framework.Internal.FailedResultTests.TestResultXmlNodeIsFailure(), NUnit.Framework.Internal.IgnoredResultTests.TestResultXmlNodeIsIgnored(), NUnit.Framework.Internal.DefaultResultTests.TestResultXmlNodeIsInconclusive(), NUnit.Framework.Internal.InconclusiveResultTests.TestResultXmlNodeIsInconclusive(), NUnit.Framework.Internal.NotRunnableResultTests.TestResultXmlNodeIsNotRunnable(), NUnit.Framework.Internal.SuccessResultTests.TestResultXmlNodeIsSuccess(), and NUnit.Framework.Internal.PropertyBagTests.XmlIsProducedCorrectly().
|
getprivate set |
Gets a list of child nodes
Referenced by NUnit.Framework.Api.FrameworkController.AddSetting(), NUnit.Framework.Interfaces.TNode.ApplySelection(), NUnit.Framework.Internal.TestXmlTests.CheckXmlForTest(), NUnit.Framework.Internal.TestFilter.FromXml(), NUnit.Framework.Interfaces.TNode.FromXml(), NUnit.Framework.Api.FrameworkController.InsertSettingsElement(), NUnitLite.NUnit3XmlOutputWriter.WriteXmlResultOutput(), and NUnit.Framework.Internal.PropertyBagTests.XmlIsProducedCorrectly().
|
get |
Gets the first ChildNode
Referenced by NUnit.Framework.Internal.TestFilter.FromXml().
|
get |
Gets the XML representation of this node.
Referenced by NUnit.Framework.Internal.Filters.TestFilterXmlTests.CategoryFilter_ToXml(), NUnit.Framework.Internal.Filters.TestFilterXmlTests.CategoryFilter_ToXml_Regex(), NUnit.Framework.Internal.Filters.TestFilterXmlTests.ClassNameFilter_ToXml(), NUnit.Framework.Internal.Filters.TestFilterXmlTests.ClassNameFilter_ToXml_Regex(), NUnit.Framework.Internal.Filters.TestFilterXmlTests.FullNameFilter_ToXml(), NUnit.Framework.Internal.Filters.TestFilterXmlTests.FullNameFilter_ToXml_Regex(), NUnit.Framework.Internal.Filters.TestFilterXmlTests.IdFilter_ToXml(), NUnit.Framework.Internal.Filters.TestFilterXmlTests.MethodNameFilter_ToXml(), NUnit.Framework.Internal.Filters.TestFilterXmlTests.MethodNameFilter_ToXml_Regex(), NUnit.Framework.Internal.Filters.TestFilterXmlTests.PropertyFilter_ToXml(), NUnit.Framework.Internal.Filters.TestFilterXmlTests.PropertyFilter_ToXml_Regex(), NUnit.Framework.Api.FrameworkController.RunTests(), NUnit.Framework.Internal.Filters.TestFilterXmlTests.TestNameFilter_ToXml(), NUnit.Framework.Internal.Filters.TestFilterXmlTests.TestNameFilter_ToXml_Regex(), and NUnit.Framework.Internal.TestXmlTests.TestNameWithInvalidCharacter().