-
-
Notifications
You must be signed in to change notification settings - Fork 110
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Description
When running the TUnit NUnit migration code fixer, the NUnit [Ignore] attribute is not converted to TUnit's [Skip] attribute.
Steps to Reproduce
- Create a project with NUnit tests that use
[Ignore]attribute - Add TUnit packages
- Run
dotnet format analyzers --severity info --diagnostics TUNU0001 - Build the project
Expected Behavior
[Ignore("reason")] should be converted to [Skip("reason")]
Actual Behavior
The [Ignore] attribute is left unchanged, causing build errors:
error CS0246: The type or namespace name 'Ignore' could not be found
error CS0246: The type or namespace name 'IgnoreAttribute' could not be found
Example
Before migration:
[Test]
[Ignore("I don't see any simple way of doing this...")]
public void Should_properly_interpret_array_of_objects()
{
// test code
}After migration (current):
[Test]
[Ignore("I don't see any simple way of doing this...")] // <-- Not converted
public async Task Should_properly_interpret_array_of_objects()
{
// test code
}Expected after migration:
[Test]
[Skip("I don't see any simple way of doing this...")]
public async Task Should_properly_interpret_array_of_objects()
{
// test code
}Environment
- TUnit version: 1.9.91
- .NET version: .NET 8.0
- OS: Windows
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working