Socket
Book a DemoInstallSign in
Socket

XMLUnit.NUnit3.Constraints

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

XMLUnit.NUnit3.Constraints

This package contains NUnit 3.x Constraints to be used with XMLUnit.NET's core. XMLUnit provides you with the tools to verify the XML you emit is the one you want to create. It provides helpers to validate against an XML Schema, assert the values of XPath queries or compare XML documents against expected outcomes.

2.11.1
nugetNuGet
Version published
Maintainers
1
Created
Source

XMLUnit.NET NUnit 3.x Constraints

XMLUnit provides you with the tools to verify the XML you emit is the one you want to create.

This package provides Constraints on top of the XMLUnit.NET core library to be used with NUnit 3.x. If you are using a different version of NUUnit, please use the package for your version.

  • XMLUnit.Core - Core Library nuget
  • XMLUnit.NUnit2.Constraints - Constraints for NUnit 2.x nuget
  • XMLUnit.NUnit4.Constraints - Constraints for NUnit 4.x nuget

[Build status]

Requirements

XMLUnit requires .NET Standard 2.0 (tested with .NET 8 rigt now) and should still support .NET Framework 3.5 and Mono.

This Constraints package requires NUnit 3.x and XMLUnit.Core.

Usage

These are some really small examples, more is available as part of the user guide

Comparing Two Documents

Assert.That(CreateTestDocument(), CompareConstraint.IsIdenticalTo(Input.FromFile("test-data/good.xml")));

Asserting an XPath Value

Assert.That("<foo>bar</foo>", HasXPathConstraint.HasXPath("/foo"));
Assert.That("<foo>bar</foo>", EvaluateXPathConstraint.HasXPath("/foo/text()",

Validating a Document Against an XML Schema

Assert.That(CreateDocument(),
            new ValidationConstraint(Input.FromFile("local.xsd")));

Additional Documentation

XMLUnit.NET is developed at github. More documentation, releases and an issue tracker can be found there.

Changelog

See the Release Notes at github.

Keywords

xmlunit

FAQs

Package last updated on 19 May 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.