DiffBuilder to create a Diff instance.
See Also: Inherited members from object.
|
Build
()Compare the Test-XML (WithTest(Object)) with the Control-XML (Ccompare(Object)) and return the collected differences in a Diff object. |
|
|
CheckForIdentical
()check test source with the control source for identically. |
|
|
CheckForSimilar
()check test source with the control source for similarity. |
|
static
|
Compare
(object)Create a DiffBuilder from all kind of types supported by Input#From(object). |
|
|
IgnoreComments
()Will remove all comment-Tags "<!-- Comment -->" from test- and control-XML before comparing. |
|
|
IgnoreCommentsUsingXSLTVersion
(string)Will remove all comment-Tags "<!-- Comment -->" from test- and control-XML before comparing. |
|
|
IgnoreElementContentWhitespace
()Ignore element content whitespace by removing all text nodes solely consisting of whitespace. |
|
|
IgnoreWhitespace
()Ignore whitespace by removing all empty text nodes and trimming the non-empty ones. |
|
|
NormalizeWhitespace
()Normalize Text-Elements by removing all empty text nodes and normalizing the non-empty ones. |
|
|
WithAttributeFilter
(Predicate<System.Xml.XmlAttribute>)Registers a filter for attributes. |
|
|
WithComparisonController
(Org.XmlUnit.Diff.ComparisonController)Replace the {@link ComparisonControllers#Default} with your own ComparisonController. |
|
|
WithComparisonFormatter
(Org.XmlUnit.Diff.IComparisonFormatter)Sets a non-default formatter for the differences found. |
|
|
WithComparisonListeners
(params Org.XmlUnit.Diff.ComparisonListener[])Registers listeners that are notified of each comparison. |
|
|
WithDifferenceEvaluator
(Org.XmlUnit.Diff.DifferenceEvaluator)Provide your own custom {@link DifferenceEvaluator} implementation. |
|
|
WithDifferenceListeners
(params Org.XmlUnit.Diff.ComparisonListener[])Registers listeners that are notified of each comparison with outcome other than ComparisonResult#EQUAL. |
|
|
WithNamespaceContext
(IDictionary<string, string>)Establish a namespace context mapping from URI to prefix that will be used in Comparison.Detail.XPath. |
|
|
WithNodeFilter
(Predicate<System.Xml.XmlNode>)Registers a filter for nodes. |
|
|
WithNodeMatcher
(Org.XmlUnit.Diff.INodeMatcher)Sets the strategy for selecting nodes to compare. |
|
|
WithTest
(object)Set the Test-Source from all kind of types supported by Input#From(object). |
static
|
Singleton<T>
(this T)An enumerable containing a single element. |
|
static
|
WithPlaceholderSupport<D>
(this D)Adds placeholder support to an IDifferenceEngineConfigurer. |
|
static
|
WithPlaceholderSupportChainedAfter<D>
(this D, Org.XmlUnit.Diff.DifferenceEvaluator)Adds placeholder support to an IDifferenceEngineConfigurer considering an additional DifferenceEvaluator. |
|
static
|
WithPlaceholderSupportUsingDelimiters<D>
(this D, string, string)Adds placeholder support to an IDifferenceEngineConfigurer. |
|
static
|
WithPlaceholderSupportUsingDelimiters<D>
(this D, string, string, string, string, string)Adds placeholder support to an IDifferenceEngineConfigurer. |
|
static
|
WithPlaceholderSupportUsingDelimitersChainedAfter<D>
(this D, string, string, Org.XmlUnit.Diff.DifferenceEvaluator)Adds placeholder support to an IDifferenceEngineConfigurer considering an additional DifferenceEvaluator. |
|
static
|
WithPlaceholderSupportUsingDelimitersChainedAfter<D>
(this D, string, string, string, string, string, Org.XmlUnit.Diff.DifferenceEvaluator)Adds placeholder support to an IDifferenceEngineConfigurer considering an additional DifferenceEvaluator. |
Compare the Test-XML (WithTest(Object)) with the Control-XML (Ccompare(Object)) and return the collected differences in a Diff object.Syntax
public Org.XmlUnit.Diff.Diff Build ()Returns
Documentation for this section has not yet been entered.Remarks
Documentation for this section has not yet been entered.Requirements
Namespace: Org.XmlUnit.Builder
Assembly: xmlunit-core (in xmlunit-core.dll)
Assembly Versions: 2.9.2.240
check test source with the control source for identically.Syntax
public DiffBuilder CheckForIdentical ()Returns
Documentation for this section has not yet been entered.Remarks
This is the Default.Requirements
Namespace: Org.XmlUnit.Builder
Assembly: xmlunit-core (in xmlunit-core.dll)
Assembly Versions: 2.9.2.240
check test source with the control source for similarity.Syntax
public DiffBuilder CheckForSimilar ()Returns
Documentation for this section has not yet been entered.Remarks
Example for Similar: The XML node "<a>Text</a>" and "<a><![CDATA[Text]]></a>" are similar and the Test will not fail.
The rating, if a node is similar, will be done by the DifferenceEvaluators#Default.
Default is {@link #CheckForIdentical()}.
Requirements
Namespace: Org.XmlUnit.Builder
Assembly: xmlunit-core (in xmlunit-core.dll)
Assembly Versions: 2.9.2.240
Create a DiffBuilder from all kind of types supported by Input#From(object).Syntax
public static DiffBuilder Compare (object control)Parameters
- control
- the expected reference document.
Returns
Documentation for this section has not yet been entered.Remarks
Documentation for this section has not yet been entered.Requirements
Namespace: Org.XmlUnit.Builder
Assembly: xmlunit-core (in xmlunit-core.dll)
Assembly Versions: 2.9.2.240
Will remove all comment-Tags "<!-- Comment -->" from test- and control-XML before comparing.Syntax
public DiffBuilder IgnoreComments ()Returns
Documentation for this section has not yet been entered.Remarks
Documentation for this section has not yet been entered.Requirements
Namespace: Org.XmlUnit.Builder
Assembly: xmlunit-core (in xmlunit-core.dll)
Assembly Versions: 2.9.2.240
Will remove all comment-Tags "<!-- Comment -->" from test- and control-XML before comparing.Syntax
public DiffBuilder IgnoreCommentsUsingXSLTVersion (string xsltVersion)Parameters
- xsltVersion
- use this version for the stylesheet
Returns
Documentation for this section has not yet been entered.Remarks
since XMLUnit 2.5.0Requirements
Namespace: Org.XmlUnit.Builder
Assembly: xmlunit-core (in xmlunit-core.dll)
Assembly Versions: 2.9.2.240
Ignore element content whitespace by removing all text nodes solely consisting of whitespace.Syntax
public DiffBuilder IgnoreElementContentWhitespace ()Returns
Documentation for this section has not yet been entered.Remarks
since XMLUnit 2.6.0Requirements
Namespace: Org.XmlUnit.Builder
Assembly: xmlunit-core (in xmlunit-core.dll)
Assembly Versions: 2.9.2.240
Ignore whitespace by removing all empty text nodes and trimming the non-empty ones.Syntax
public DiffBuilder IgnoreWhitespace ()Returns
Documentation for this section has not yet been entered.Remarks
If you only want to remove text nodes consisting solely of whitespace (AKA element content whitespace) but leave all other text nodes alone you should use ignoreElementContentWhitespace instead.Requirements
Namespace: Org.XmlUnit.Builder
Assembly: xmlunit-core (in xmlunit-core.dll)
Assembly Versions: 2.9.2.240
Normalize Text-Elements by removing all empty text nodes and normalizing the non-empty ones.Syntax
public DiffBuilder NormalizeWhitespace ()Returns
Documentation for this section has not yet been entered.Remarks
"normalized" in this context means all whitespace characters are replaced by space characters and consecutive whitespace characters are collapsed.Requirements
Namespace: Org.XmlUnit.Builder
Assembly: xmlunit-core (in xmlunit-core.dll)
Assembly Versions: 2.9.2.240
Registers a filter for attributes.Syntax
public DiffBuilder WithAttributeFilter (Predicate<System.Xml.XmlAttribute> attributeFilter)Parameters
- attributeFilter
- Documentation for this section has not yet been entered.
Returns
Documentation for this section has not yet been entered.Remarks
Only attributes for which the predicate returns true are part of the comparison. By default all attributes are considered.
The "special" namespace, namespace-location and schema-instance-type attributes can not be ignored this way. If you want to suppress comparison of them you'll need to implement Org.XmlUnit.Diff.DifferenceEvaluator
Requirements
Namespace: Org.XmlUnit.Builder
Assembly: xmlunit-core (in xmlunit-core.dll)
Assembly Versions: 2.9.2.240
Replace the {@link ComparisonControllers#Default} with your own ComparisonController.Syntax
public DiffBuilder WithComparisonController (Org.XmlUnit.Diff.ComparisonController comparisonController)Parameters
- comparisonController
- 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.Builder
Assembly: xmlunit-core (in xmlunit-core.dll)
Assembly Versions: 2.9.2.240
Sets a non-default formatter for the differences found.Syntax
public DiffBuilder WithComparisonFormatter (Org.XmlUnit.Diff.IComparisonFormatter formatter)Parameters
- formatter
- 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.Builder
Assembly: xmlunit-core (in xmlunit-core.dll)
Assembly Versions: 2.9.2.240
Registers listeners that are notified of each comparison.Syntax
public DiffBuilder WithComparisonListeners (params Org.XmlUnit.Diff.ComparisonListener[] comparisonListeners)Parameters
- comparisonListeners
- 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.Builder
Assembly: xmlunit-core (in xmlunit-core.dll)
Assembly Versions: 2.9.2.240
Provide your own custom {@link DifferenceEvaluator} implementation.Syntax
public DiffBuilder WithDifferenceEvaluator (Org.XmlUnit.Diff.DifferenceEvaluator differenceEvaluator)Parameters
- differenceEvaluator
- Documentation for this section has not yet been entered.
Returns
Documentation for this section has not yet been entered.Remarks
This overwrites the Default DifferenceEvaluator.
If you want use your custom DifferenceEvaluator in combination with the default or another DifferenceEvaluator you should use DifferenceEvaluators#Chain() or DifferenceEvaluators#First() to combine them:
Requirements
Namespace: Org.XmlUnit.Builder
Assembly: xmlunit-core (in xmlunit-core.dll)
Assembly Versions: 2.9.2.240
Registers listeners that are notified of each comparison with outcome other than ComparisonResult#EQUAL.Syntax
public DiffBuilder WithDifferenceListeners (params Org.XmlUnit.Diff.ComparisonListener[] comparisonListeners)Parameters
- comparisonListeners
- 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.Builder
Assembly: xmlunit-core (in xmlunit-core.dll)
Assembly Versions: 2.9.2.240
Establish a namespace context mapping from URI to prefix that will be used in Comparison.Detail.XPath.Syntax
public DiffBuilder WithNamespaceContext (IDictionary<string, string> ctx)Parameters
- ctx
- Documentation for this section has not yet been entered.
Returns
Documentation for this section has not yet been entered.Remarks
Without a namespace context (or with an empty context) the XPath expressions will only use local names for elements and attributes.Requirements
Namespace: Org.XmlUnit.Builder
Assembly: xmlunit-core (in xmlunit-core.dll)
Assembly Versions: 2.9.2.240
Registers a filter for nodes.Syntax
public DiffBuilder WithNodeFilter (Predicate<System.Xml.XmlNode> nodeFilter)Parameters
- nodeFilter
- Documentation for this section has not yet been entered.
Returns
Documentation for this section has not yet been entered.Remarks
Only nodes for which the predicate returns true are part of the comparison. By default nodes that are neither document types nor XML declarations are considered.Requirements
Namespace: Org.XmlUnit.Builder
Assembly: xmlunit-core (in xmlunit-core.dll)
Assembly Versions: 2.9.2.240
Sets the strategy for selecting nodes to compare.Syntax
public DiffBuilder WithNodeMatcher (Org.XmlUnit.Diff.INodeMatcher nodeMatcher)Parameters
- nodeMatcher
- Documentation for this section has not yet been entered.
Returns
Documentation for this section has not yet been entered.Remarks
Example with org.xmlunit.diff.DefaultNodeMatcher: .WithNodeMatcher(new DefaultNodeMatcher(ElementSelectors.ByNameAndText))Requirements
Namespace: Org.XmlUnit.Builder
Assembly: xmlunit-core (in xmlunit-core.dll)
Assembly Versions: 2.9.2.240
Set the Test-Source from all kind of types supported by Input#From(object).Syntax
public DiffBuilder WithTest (object test)Parameters
- test
- the test document which must be compared with the control document.
Returns
Documentation for this section has not yet been entered.Remarks
Documentation for this section has not yet been entered.Requirements
Namespace: Org.XmlUnit.Builder
Assembly: xmlunit-core (in xmlunit-core.dll)
Assembly Versions: 2.9.2.240