xmlunit-nunit3-constraints : Org.XmlUnit.Constraints Namespace

EvaluateXPathConstraint Class

Documentation for this section has not yet been entered.

Syntax

public class EvaluateXPathConstraint : NUnit.Framework.Constraints.Constraint

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: Org.XmlUnit.Constraints
Assembly: xmlunit-nunit3-constraints (in xmlunit-nunit3-constraints.dll)
Assembly Versions: 2.9.2.240

Members

See Also: Inherited members from NUnit.Framework.Constraints.Constraint.

Public Constructors

Creates a Org.XmlUnit.Constraints.EvaluateXPathConstraint instance with the associated XPath expression and the value constraint corresponding to the XPath evaluation.

Public Methods

override
ApplyTo<TActual> (TActual) : NUnit.Framework.Constraints.ConstraintResult
Documentation for this section has not yet been entered.
static
HasXPath (string, NUnit.Framework.Constraints.IConstraint) : EvaluateXPathConstraint
Creates a constraint that matches when the examined XML input has a value at the specified xPath that satisfies the specified valueConstraint.
WithNamespaceContext (IDictionary<string, string>) : EvaluateXPathConstraint
Utility method used for creating a namespace context mapping to be used in XPath matching.

Extension Methods

static
Singleton<T> (this T) : IEnumerable<T>
An enumerable containing a single element.

Member Details

EvaluateXPathConstraint Constructor

Creates a Org.XmlUnit.Constraints.EvaluateXPathConstraint instance with the associated XPath expression and the value constraint corresponding to the XPath evaluation.

Syntax

public EvaluateXPathConstraint (string xPath, NUnit.Framework.Constraints.IConstraint valueConstraint)

Parameters

xPath
xPath expression
valueConstraint
constraint for the value at the specified xpath

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: Org.XmlUnit.Constraints
Assembly: xmlunit-nunit3-constraints (in xmlunit-nunit3-constraints.dll)
Assembly Versions: 2.9.2.240

ApplyTo<TActual> Generic Method

Documentation for this section has not yet been entered.

Syntax

public override NUnit.Framework.Constraints.ConstraintResult ApplyTo<TActual> (TActual actual)

Type Parameters

TActual
Documentation for this section has not yet been entered.

Parameters

actual
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.Constraints
Assembly: xmlunit-nunit3-constraints (in xmlunit-nunit3-constraints.dll)
Assembly Versions: 2.9.2.240

HasXPath Method

Creates a constraint that matches when the examined XML input has a value at the specified xPath that satisfies the specified valueConstraint.

Syntax

public static EvaluateXPathConstraint HasXPath (string xPath, NUnit.Framework.Constraints.IConstraint valueConstraint)

Parameters

xPath
xPath expression
valueConstraint
constraint for the value at the specified xpath

Returns

the xpath constraint

Remarks

Documentation for this section has not yet been entered.

Example

For example
Example
            Assert.That(xml, EvaluateXPathConstraint.HasXPath("//fruits/fruit/@name",
                                                              Is.EqualTo("apple"))
              

Requirements

Namespace: Org.XmlUnit.Constraints
Assembly: xmlunit-nunit3-constraints (in xmlunit-nunit3-constraints.dll)
Assembly Versions: 2.9.2.240

WithNamespaceContext Method

Utility method used for creating a namespace context mapping to be used in XPath matching.

Syntax

public EvaluateXPathConstraint WithNamespaceContext (IDictionary<string, string> prefix2Uri)

Parameters

prefix2Uri
maps from prefix to namespace URI. It is used to resolve XML namespace prefixes in the XPath expression

Returns

Documentation for this section has not yet been entered.

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: Org.XmlUnit.Constraints
Assembly: xmlunit-nunit3-constraints (in xmlunit-nunit3-constraints.dll)
Assembly Versions: 2.9.2.240