Releases: xmlunit/xmlunit.net
XMLUnit.NET 2.10.0
-
adjusted the NUnit 3.x constraints so they should work for NUnit 4.x as well.
Issue #40. -
add a new
ElementSelectors.ByNameAndAllAttributes
variant that filters attributes before deciding whether elements can be compared.
Inspired by Issue #xmlunit/259 -
Nodes.GetMergedNestedText
andNodes.StripElementContentWhitespace
had the same problem of not knowning aboutXmlWhitespace
that caused Issue #38. And neither of the methods could deal withXmlSignificantWhitespace
at all. -
add
XmlWhitespaceStrippedSource
,XmlWhitespaceNormalizedSource
, andXmlElementContentWhitespaceStrippedSource
that only trim characters that are considered whitespace by the XML Specification from textual content.
Also added new modifiers toDiffBuilder
that make use of the newISource
types.
Issue #39.
XMLUnit.NET 2.9.2
This is a small feature and bugfix release.
The full changelog is
-
added
NodeFilters#SatisfiesAll
andSatifiesAny
methods to make it easier to combine multiple node filters.
added to simplify the use case of xmlunit/#249 -
when documents contained element content whitespace represented by
System.Xml.XmlWhitespace
the types and methods that are supposed to strip or normalize whitespace would fail.
Issue #38
XMLUnit.NET 2.9.1
XMLUnit.NET ports changes made to XMLUnit for Java 2.8.3 and 2.8.4. The full changelog is:
-
improved comparison performance for documents with many siblings
based on a suggestion by @gerpres made in Java Issue xmlunit/#236 -
added a new
FullDescription
method toDiff
that provides a string-representation of all differences - not just the first one likeToString
does.
Based on Java PR xmlunit/#235 by @Boiarshinov
XMLUnit.NET 2.9.0
This release fixes a bug for a very specific setup and makes ISource
disposable.
Full details:
-
ISource
now extendsIDisposable
to allow releasing unmanaged resources used when building sources from files or URIs.This change is backwards incompatible if you are providing
ISource
implementations of your own.
#33. -
DefaultNodeMatcher
with multipleElementSelector
s could fail to find the best matches as the order ofElementSelector
s should select them.
Issue similar to xmlunit/#197
XMLUnit.NET 2.8.0
This version contains a backwards incompatible change to the IPlaceholderHandler
interface that is part of the experimental placeholders module: The Evaluate
method now receives a variable number of string arguments in addition to the textual content of the element/attribute. This allows placeholders like ${xmlunit.matchesRegex(some\s*regex)}
.
Only the placeholder package has been changed, all other packages are functionally identical to XMLUnit.NET 2.7.2.
-
add a new
${xmlunit.isDateTime}
placeholder
PRs #31 and #32 by MilkyWare -
added a new
${xmlunit.matchesRegex(regex)}
placeholder
based on Java PR xmlunit/#178 by @Jazzyekim.
XMLUnit.NET 2.7.2
This release fixes a bug in the construction of XPaths in certain corner cases:
- the XPath values for comparisons resulting in
CHILD_LOOKUP
differences could be wrong whenNodeFilter
s were present.
Issue #29
XMLUnit.NET 2.7.1
The release fixes a bug in a corner-case and adds a new isNumber placeholder.
The full list of changes:
-
add a new
${xmlunit.isNumber}
placeholder
Based on the Java PR xmlunit/#154 by @NathanAtClarity. -
the XPath values of a comparison should not be affected by any
NodeFilter
being in effect.
Issue similar to xmlunit/#156
XMLUnit.NET 2.7.0
This release is identical to XMLUnit.NET 2.7.0-beta-01. It adds support for .NET Standard 2.0 in addition to the traditional .NET Framework 3.5.
Many thanks to @Shatl who performed most of the heavy lifting which has made this release possible.
XMLUnit.NET 2.7.0-beta-01
This is the very first release of XMLUnit.NET that supports .NET Standard 2.0 in addition to the traditional .NET Framework 3.5. Only the build process and the nuget packages have changed, there is no other difference between this release and XMLUnit.NET 2.6.0. If you don't need support for .NET Standard there is no reason to upgrade.
This release has been labeled beta as the packaging needs more thorough testing by the community.
Many thanks to @Shatl who performed most of the heavy lifting which has made this release possible.
XMLUnit.NET 2.6.0
This release fixes a few bugs and introduces a new experimental feature.
The full list of changes for XMLUnit.NET:
-
add a new experimental module xmlunit-placeholders which aims to
use${xmlunit.FOO}
expressions inside of the control document to
allow for a DSL-like approach of defining more complex tests.
This initial seed only supports${xmlunit.ignore}
which can be
used to make XMLUnit ignore the element containing this text. -
fixed the message when
CompareConstraint
or
ValidationConstraints
(both NUnit 2.x and 3.x) as well as
EvaluateXPathConstraint
orHasXPathConstraint
(only the NUnit
3.x versions) pass but the assertion fails because the constraint
itself was wrapped in aNot
constraint. -
the NUnit 3.x
EvaluateXPathConstraint
failed to resolve the nested
constraint, leading to erroneous messages if the assertion failed.
Issue #25 -
the
XmlDocument
instances used internally inConvert
and
Transformation
now get theirXmlResolver
property set tonull
by default - which happens to be the default value of .NET 4.5.2 and
later anyway. This is in accordance with the OWASP recommendations
for XML eXternal Entity injection
preventions.This may be a breaking change and you may need to provide an
explicitXmlResolver
instance of your own if you need to load
external entities.Issue #27.
-
added a new
ISource
implementation
ElementContentWhitespaceStrippedSource
which is similar to
WhitespaceStrippedSource
but only affects text nodes that solely
consist of whitespace and doesn't affect any other text nodes. Also
added convenienceIgnoreElementContentWhitespace
methods to
DiffBuilder
andCompareConstraint
.
Issue similar to xmlunit/#119. -
the configured
NodeFilter
is now applied before comparing
XmlDocumentType
nodes.This change breaks backwards compatibility as the old behavior was
to ignoreXmlDocumentType
when counting the children of the
XmlDocument
node but not when actually comparing the
XmlDocumentType
. Prior to this change if one document had a document
type declaration but the other didn't, aHAS_DOCTYPE_DECLARATION
difference was detected, this will no longer be the case now. If you
want to detect this difference, you need to use a more lenient
NodeFilter
thanNodeFilters.Default
(i.e.NodeFilters.AcceptAll
) but then you will see an additional
CHILD_NODELIST_LENGTH
difference.Issue #26.