site/releases/analyzers/1.5.0.md
Today, we're shipping one new release:
1.5.0It's been 1 month since the release of 1.4.0.
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 1.4.0 to 1.5.0.
xUnit1012 has been updated to account for nullable reference types when passing null values into [InlineData]. xunit/xunit#2189{ .issue-link } xunit/xunit.analyzers#164{ .issue-link }
Added three new analyzers to ensure that [MemberData] usage with data generation methods have compatible arguments: xunit/xunit#2189{ .issue-link } xunit/xunit.analyzers#165{ .issue-link }
Added four new analyzers to help users return TheoryData<> from [MemberData]: xunit/xunit#2189{ .issue-link } xunit/xunit.analyzers#166{ .issue-link }
TheoryData<> for your test method.TheoryData<> for your test method.TheoryData<> is not compatible with the corresponding parameter in your test method.TheoryData<> is a nullable reference type but the test method parameter is not nullable.Analysis in xUnit2014 was updated to remove support for ValueTask in the Assert.Throws since it is no longer supported as of 2.6.1 (due to compiler ambiguity problems with async lambdas).
Added xUnit2021 to warn developers when async assertions are not being awaited. This includes:
Assert.PropertyChangedAsyncAssert.RaisesAnyAsyncAssert.RaisesAsyncAssert.ThrowsAnyAsyncAssert.ThrowsAsyncThis feature is limited to just assertions shipped with xUnit.net; it does not include third party assertions nor any calls to non-assertion async methods. Note that while CS4014 can report un-awaited tasks, it will only do so if the method is already marked as async. xUnit2021 will always be reported regardless of whether the test method is async or not (and is reported as an Error, while CS4014 is reported as a Warning). xunit/xunit#2346{ .issue-link }
Added xUnit2022 to suggest to developers that they should not use a negated expression with Assert.True or Assert.False, and should instead use a non-negated expression with the opposite assertion. xunit/xunit#1435{ .issue-link }