Table of Contents

Analyzers 1.6.0 2023 November 18

Today, we're shipping three new releases:

  • xUnit.net Core Framework v2 2.6.2 (release notes)
  • xUnit.net Analyzers 1.6.0
  • xUnit.net Visual Studio adapter 2.5.4 (release notes)

It's been 1 week since the release of 1.5.0.

As always, we'd like to thank all the users who contributed to the success of xUnit.net through usage, feedback, and code. 🎉

Release Notes

These release notes are a comprehensive list of changes from 1.5.0 to 1.6.0.

Usage Analyzers

  • BUG: Fixed an issue with xUnit1035 where enum values in [MemberData] method arguments were incorrectly triggered as incompatible. xunit/xunit#2817

  • BUG: Fixed an issue with xUnit1039 which mistakenly categorized generic typed parameters as incompatible with all theory data. Note that this fix does not attempt to resolve any generic type constraints; if you provide data that violates a generic type constraint, that will be raised at runtime rather than during analysis. xunit/xunit#2819

Assertion Analyzers

  • Updated xUnit2007 to account for the fact that abstract static methods in interfaces are not eligible for use as generic types, which caused the fixer to create broken code. The rule will no longer trigger, and the fix will no longer be offered. xunit/xunit#2798

  • Added xUnit2023 to suggest replacing usage of Assert.Collection with a single lambda instead with Assert.Single (and moving the lambda's code out into the body of the unit test). xunit/xunit#2123