Formatter methods for a Comparison Object.
See Also: Inherited members from object.
|
Documentation for this section has not yet been entered. |
|
GetDescription
(Comparison)Return a short String of the Comparison including the XPath and the shorten value of the effected control and test Node. |
|
|
GetDetails
(Comparison.Detail, ComparisonType, bool)Return the xml node from Detail#Target as formatted String. |
|
AppendAttribute
(System.Text.StringBuilder, System.Xml.XmlAttribute)Formats a placeholder for an attribute for GetShortString. |
|
|
AppendComment
(System.Text.StringBuilder, System.Xml.XmlComment)Formats a comment for GetShortString. |
|
|
AppendDocumentElementIndication
(System.Text.StringBuilder, System.Xml.XmlDocument)Appends a short indication of the document's root element like "<ElementName...>" for GetShortString. |
|
|
AppendDocumentType
(System.Text.StringBuilder, System.Xml.XmlDocumentType)Appends the XML DOCTYPE for GetShortString or AppendFullDocumentHeader if present. |
|
|
AppendDocumentXmlDeclaration
(System.Text.StringBuilder, System.Xml.XmlDeclaration)Appends the XML declaration for GetShortString or AppendFullDocumentHeader if it contains non-default values. |
|
|
AppendElement
(System.Text.StringBuilder, System.Xml.XmlElement)Formats a placeholder for an element for GetShortString. |
|
|
AppendFullDocumentHeader
(System.Text.StringBuilder, System.Xml.XmlDocument)Appends the XML declaration and DOCTYPE if present as well as the document's root element for GetFullFormattedXml. |
|
|
AppendProcessingInstruction
(System.Text.StringBuilder, System.Xml.XmlProcessingInstruction)Formats a processing instruction for GetShortString. |
|
|
AppendText
(System.Text.StringBuilder, System.Xml.XmlCharacterData)Formats a text or CDATA node for GetShortString. |
|
|
AppendXPath
(System.Text.StringBuilder, string)Appends the XPath information for GetShortString if present. |
|
|
CreateXmlWriter
(System.Text.StringBuilder, int)Create a default Writer to format a XML-Node to a String. |
|
|
GetFormattedNodeXml
(System.Xml.XmlNode, bool)Formats a node with the help of XmlWriter. |
|
|
GetFullFormattedXml
(System.Xml.XmlNode, ComparisonType, bool)Formats the node using a format suitable for the node type and comparison. |
|
|
GetShortString
(System.Xml.XmlNode, string, ComparisonType)Return a string representation for GetShortString that describes the "thing" that has been compared so users know how to locate it. |
|
|
GetValue
(object, ComparisonType)May alter the display of a comparison value for GetShortString based on the comparison type. |
|
|
NodeType
(System.Xml.XmlNodeType)Provides a display text for the constant values of the XmlNodeType enum. |
static
|
Singleton<T>
(this T)An enumerable containing a single element. |
Documentation for this section has not yet been entered.Syntax
public DefaultComparisonFormatter ()Remarks
Documentation for this section has not yet been entered.Requirements
Namespace: Org.XmlUnit.Diff
Assembly: xmlunit-core (in xmlunit-core.dll)
Assembly Versions: 2.10.0.241
Formats a placeholder for an attribute for GetShortString.Syntax
protected virtual void AppendAttribute (System.Text.StringBuilder sb, System.Xml.XmlAttribute aNode)Parameters
- sb
- the builder to append to
- aNode
- the attribute
Remarks
Documentation for this section has not yet been entered.Requirements
Namespace: Org.XmlUnit.Diff
Assembly: xmlunit-core (in xmlunit-core.dll)
Assembly Versions: 2.10.0.241
Formats a comment for GetShortString.Syntax
Parameters
- sb
- the builder to append to
- aNode
- the comment
Remarks
Documentation for this section has not yet been entered.Requirements
Namespace: Org.XmlUnit.Diff
Assembly: xmlunit-core (in xmlunit-core.dll)
Assembly Versions: 2.10.0.241
Appends a short indication of the document's root element like "<ElementName...>" for GetShortString.Syntax
protected virtual void AppendDocumentElementIndication (System.Text.StringBuilder sb, System.Xml.XmlDocument doc)Parameters
- sb
- the builder to append to
- doc
- the XML document node
Remarks
Documentation for this section has not yet been entered.Requirements
Namespace: Org.XmlUnit.Diff
Assembly: xmlunit-core (in xmlunit-core.dll)
Assembly Versions: 2.10.0.241
Appends the XML DOCTYPE for GetShortString or AppendFullDocumentHeader if present.Syntax
protected virtual bool AppendDocumentType (System.Text.StringBuilder sb, System.Xml.XmlDocumentType type)Parameters
- sb
- the builder to append to
- type
- the document type
Returns
Documentation for this section has not yet been entered.Remarks
Documentation for this section has not yet been entered.Requirements
Namespace: Org.XmlUnit.Diff
Assembly: xmlunit-core (in xmlunit-core.dll)
Assembly Versions: 2.10.0.241
Appends the XML declaration for GetShortString or AppendFullDocumentHeader if it contains non-default values.Syntax
protected virtual bool AppendDocumentXmlDeclaration (System.Text.StringBuilder sb, System.Xml.XmlDeclaration dec)Parameters
- sb
- the builder to append to
- dec
- Documentation for this section has not yet been entered.
Returns
Documentation for this section has not yet been entered.Remarks
Documentation for this section has not yet been entered.Requirements
Namespace: Org.XmlUnit.Diff
Assembly: xmlunit-core (in xmlunit-core.dll)
Assembly Versions: 2.10.0.241
Formats a placeholder for an element for GetShortString.Syntax
Parameters
- sb
- the builder to append to
- aNode
- the element
Remarks
Documentation for this section has not yet been entered.Requirements
Namespace: Org.XmlUnit.Diff
Assembly: xmlunit-core (in xmlunit-core.dll)
Assembly Versions: 2.10.0.241
Appends the XML declaration and DOCTYPE if present as well as the document's root element for GetFullFormattedXml.Syntax
protected virtual void AppendFullDocumentHeader (System.Text.StringBuilder sb, System.Xml.XmlDocument doc)Parameters
- sb
- the builder to append to
- doc
- the document to format
Remarks
Documentation for this section has not yet been entered.Requirements
Namespace: Org.XmlUnit.Diff
Assembly: xmlunit-core (in xmlunit-core.dll)
Assembly Versions: 2.10.0.241
Formats a processing instruction for GetShortString.Syntax
protected virtual void AppendProcessingInstruction (System.Text.StringBuilder sb, System.Xml.XmlProcessingInstruction instr)Parameters
- sb
- the builder to append to
- instr
- the processing instruction
Remarks
Documentation for this section has not yet been entered.Requirements
Namespace: Org.XmlUnit.Diff
Assembly: xmlunit-core (in xmlunit-core.dll)
Assembly Versions: 2.10.0.241
Formats a text or CDATA node for GetShortString.Syntax
Parameters
- sb
- the builder to append to
- aNode
- the text or CDATA node
Remarks
Documentation for this section has not yet been entered.Requirements
Namespace: Org.XmlUnit.Diff
Assembly: xmlunit-core (in xmlunit-core.dll)
Assembly Versions: 2.10.0.241
Appends the XPath information for GetShortString if present.Syntax
Parameters
- sb
- the builder to append to
- xpath
- the xpath to append, if any
Remarks
Documentation for this section has not yet been entered.Requirements
Namespace: Org.XmlUnit.Diff
Assembly: xmlunit-core (in xmlunit-core.dll)
Assembly Versions: 2.10.0.241
Create a default Writer to format a XML-Node to a String.Syntax
protected virtual System.Xml.XmlWriter CreateXmlWriter (System.Text.StringBuilder sb, int numberOfBlanksToIndent)Parameters
- sb
- StringBuilder to wrap as writer
- numberOfBlanksToIndent
- the number of spaces which is used for indent the XML-structure
Returns
Documentation for this section has not yet been entered.Remarks
Documentation for this section has not yet been entered.Requirements
Namespace: Org.XmlUnit.Diff
Assembly: xmlunit-core (in xmlunit-core.dll)
Assembly Versions: 2.10.0.241
Return a short String of the Comparison including the XPath and the shorten value of the effected control and test Node.Syntax
public string GetDescription (Comparison difference)Parameters
- difference
- Documentation for this section has not yet been entered.
Returns
Documentation for this section has not yet been entered.Remarks
In general the String will look like "Expected X 'Y' but was 'Z' - comparing A to B" where A and B are the result of invoking GetShortString on the target and XPath of the control and test details of the comparison. A is the description of the comparison and B and C are the control and test values (passed through GetValue) respectively.
For missing attributes the string has a slightly different format.
Requirements
Namespace: Org.XmlUnit.Diff
Assembly: xmlunit-core (in xmlunit-core.dll)
Assembly Versions: 2.10.0.241
Return the xml node from Detail#Target as formatted String.Syntax
Parameters
- difference
- Documentation for this section has not yet been entered.
- type
- The implementation can return different details depending on the ComparisonType.
- formatXml
- set this to true if the Comparison was generated with DiffBuilder#IgnoreWhitespace.
Returns
Documentation for this section has not yet been entered.Remarks
Delegates to GetFullFormattedXml unless the Comparison.Detail's Target is null.Requirements
Namespace: Org.XmlUnit.Diff
Assembly: xmlunit-core (in xmlunit-core.dll)
Assembly Versions: 2.10.0.241
Formats a node with the help of XmlWriter.Syntax
Parameters
- nodeToConvert
- the node to format
- formatXml
- true if the Comparison was generated with IgnoreWhitespace - this affects the indentation of the generated output
Returns
Documentation for this section has not yet been entered.Remarks
Documentation for this section has not yet been entered.Requirements
Namespace: Org.XmlUnit.Diff
Assembly: xmlunit-core (in xmlunit-core.dll)
Assembly Versions: 2.10.0.241
Formats the node using a format suitable for the node type and comparison.Syntax
protected virtual string GetFullFormattedXml (System.Xml.XmlNode node, ComparisonType type, bool formatXml)Parameters
- node
- the node to format
- type
- the comparison type
- formatXml
- true if the Comparison was generated with IgnoreWhitespace - this affects the indentation of the generated output
Returns
Documentation for this section has not yet been entered.Remarks
The implementation outputs the document prolog and start element for Document and DocumentType nodes and may elect to format the node's parent element rather than just the node depending on the node and comparison type. It delegates to AppendFullDocumentHeader or GetFormattedNodeXml.Requirements
Namespace: Org.XmlUnit.Diff
Assembly: xmlunit-core (in xmlunit-core.dll)
Assembly Versions: 2.10.0.241
Return a string representation for GetShortString that describes the "thing" that has been compared so users know how to locate it.Syntax
protected virtual string GetShortString (System.Xml.XmlNode node, string xpath, ComparisonType type)Parameters
- node
- the node to describe
- xpath
- xpath of the node if applicable
- type
- the comparison type
Returns
Documentation for this section has not yet been entered.Remarks
Examples are "<bar ...> at /foo[1]/bar[1]" for a comparison of elements or "<!-- Comment Text --> at /foo[2]/comment()[1]" for a comment.
This implementation dispatches to several AppendX methods based on the comparison type or the type of the node.
Requirements
Namespace: Org.XmlUnit.Diff
Assembly: xmlunit-core (in xmlunit-core.dll)
Assembly Versions: 2.10.0.241
May alter the display of a comparison value for GetShortString based on the comparison type.Syntax
Parameters
- value
- the value to display
- type
- the comparison type
Returns
Documentation for this section has not yet been entered.Remarks
This implementation returns value unless it is a comparison of node types in which case the numeric value (one of the values of the XmlNodeType enum) is mapped to a more useful string.Requirements
Namespace: Org.XmlUnit.Diff
Assembly: xmlunit-core (in xmlunit-core.dll)
Assembly Versions: 2.10.0.241
Provides a display text for the constant values of the XmlNodeType enum.Syntax
protected virtual string NodeType (System.Xml.XmlNodeType type)Parameters
- type
- the node type
Returns
Documentation for this section has not yet been entered.Remarks
Documentation for this section has not yet been entered.Requirements
Namespace: Org.XmlUnit.Diff
Assembly: xmlunit-core (in xmlunit-core.dll)
Assembly Versions: 2.10.0.241