-
-
Notifications
You must be signed in to change notification settings - Fork 111
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Description
An xunit assertion with item inspectors like this...
Assert.Collection(orderings,
ordering =>
{
var prop = Assert.Single(ordering.Properties);
Assert.Equal("Parent", prop.Name);
}
);... has the item inspectors dropped entirely, leaving only await Assert.That(orderings).HasCount(1);
This leads to tests that still pass, but in a large test refactor, its easy to miss that the other assertions were lost.
Expected Behavior
Item assertions are preserved in some form, or the Assert.Collection is left as-is for the user to convert to TUnit manually.
Actual Behavior
Assertions are dropped in a way that still leaves passing tests in place, but missing additional critical test logic.
Steps to Reproduce
Run xUnit code fixer on an assertion like this:
Assert.Collection(orderings,
ordering =>
{
var prop = Assert.Single(ordering.Properties);
Assert.Equal("Parent", prop.Name);
}
);TUnit Version
1.14.0
.NET Version
NET 10
Operating System
Windows
IDE / Test Runner
dotnet CLI (dotnet test / dotnet run)
Error Output / Stack Trace
Additional Context
No response
IDE-Specific Issue?
- I've confirmed this issue occurs when running via
dotnet testordotnet run, not just in my IDE
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working