Today, we're shipping three new releases:
It's been 1 month since the release of 2.6.6 RTM.
As always, we'd like to thank all the users who contributed to the success of xUnit.net through usage, feedback, and code. 🎉
These release notes are a comprehensive list of changes from 2.6.6 to 2.7.0.
SynchronousMessageBus
caused by a constructor
change. The old constructor has been restored and marked as [Obsolete]
.
ConfigWarnings
property to XunitProjectAssembly
which will
contain warnings related to unsupported configuration file types, files which cannot be found/loaded,
JSON config files which are malformed, or any time an exception is thrown while loading/parsing
configuration. It is the responsibility of the runner to find an appropriate place to report these
warnings. We have updated all the first party runners (xunit.runner.console
,
xunit.runner.msbuild
, xunit.runner.tdnet
, and xunit.runner.visualstudio
)
to report these.
xunit/xunit#1655
AsyncTestSyncContext
for tests marked as async void
.
This may provide a slight performance improvement for some users.
xunit/xunit#2573
[Fact(Timeout = n)]
if the test is not
async. Previously this resulted in behavior where the timeout was ignored.
IAsyncEnumerable<T>
in the following assertions:
Assert.All
Assert.AllAsync
Assert.Collection
Assert.CollectionAsync
Assert.Contains
Assert.Distinct
Assert.DoesNotContain
Assert.Empty
Assert.Equal
Assert.NotEqual
Assert.Single
AssertHelper.ToEnumerable()
to convert an async enumerable
into a standard enumerable.
Assert.Contains
and Assert.DoesNotContain
to extend our
special handling of sets from just the concrete HashSet<T>
to any class which
implements ISet<T>
. We also extend this support to any class which implements
IReadOnlySet<T>
, if you are using .NET 6 or later (via binary NuGet dependency)
or .NET 5 or later (via source dependency).
Span<char>
and
ReadOnlySpan<char>
to indicate that these assertion treat the spans like strings
rather than like collections of characters. While this has always been true, the documentation did not
make that clear previously. We have also updated the documentation for the overloads that can ignore
white-space to include a complete list of the characters that we consider white-space (there are 21
separate characters that we consider white-space at the time of this release).
Assert.Equal
and Assert.NotEqual
, when showing
type names, if the type is a compiler generated type we simply now display <generated>
rather than the mangled auto-generated type name.
Assert.Collection
where the inner stack trace
was no longer being displayed, making it difficult to know which precise line of code caused the
comparison failure.
xunit/xunit#2871