Migrate xUnit attributes to TUnit
ProprietaryReplace xUnit test attributes ([Fact], [Theory], [InlineData], etc.) with their TUnit equivalents.
OpenRewrite. Recipes. CSharp. Migration. TUnit. FromXUnit. MigrateFromXUnitAttributesmod run . --recipe= OpenRewrite. Recipes. CSharp. Migration. TUnit. FromXUnit. MigrateFromXUnitAttributesInstall 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.
- Extract
Skipinto[Skip]attribute - Extract
Timeoutinto[Timeout]attribute - Replace
[Trait("Category", ...)]with[Category] - Replace
[Fact]with[Test] - Replace
[Theory]with[Test] - Replace
[InlineData]with[Arguments] - Replace
[MemberData]with[MethodDataSource] - Replace
[Trait]with[Property] - Replace
ICollectionFixture<T>with[ClassDataSource<T>] - Replace
[Collection]with[NotInParallel]