Migrate xUnit attributes to TUnit

Proprietary

Replace xUnit test attributes ([Fact], [Theory], [InlineData], etc.) with their TUnit equivalents.

OpenRewrite.Recipes.CSharp.Migration.TUnit.FromXUnit.MigrateFromXUnitAttributes
mod run . --recipe=OpenRewrite.Recipes.CSharp.Migration.TUnit.FromXUnit.MigrateFromXUnitAttributes

Install it once, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.

Recipe list

It runs these recipes, in this order.

  1. Extract Skip into [Skip] attribute
  2. Extract Timeout into [Timeout] attribute
  3. Replace [Trait("Category", ...)] with [Category]
  4. Replace [Fact] with [Test]
  5. Replace [Theory] with [Test]
  6. Replace [InlineData] with [Arguments]
  7. Replace [MemberData] with [MethodDataSource]
  8. Replace [Trait] with [Property]
  9. Replace ICollectionFixture<T> with [ClassDataSource<T>]
  10. Replace [Collection] with [NotInParallel]