This is co-released with
xunit.analyzers
version 1.3.0-pre.19
and
xunit.runner.visualstudio
version 2.5.1-pre.11
.
CollectionTracker
.
The collection tracker was attempting to use its enumerator after it had been disposed, which manifested
in this particular case as a stray NullReferenceException
with Assert.Single
using a string of 5 characters of fewer, but in reality caused unexpected behavior depending on the
specific enumerator implementation. This could impact any assertion that inspected a collection.
xunit/xunit#2762
FileInfo
and DirectoryInfo
were
causing a stack overflow in Assert.Equivalent
, because they create an endless loop of objects
in their hierarchy (through the Root
property of DirectoryInfo
). There were
two fixes added:
FileSystemInfo
, the base class for FileInfo
and
DirectoryInfo
. When two of these are compared against each other, they only compare
the value of the FullName
property. Analysis shows that every other property is in
some way derived from the item on disk (whether it's a file or a directory), so comparing the
full names should be a good test of equivalency.
Assert.Equivalent
. If you try to
compare two instances of these classes with Assert.Equal
, they will show up as not equal,
because they are reference types which don't implement any of the equality interfaces in .NET that
you would normally expect/need when comparing equality.
xunit/xunit#2767