Description
Description
I just tried upgrading the test projects to .NET7 preview 5 to see that were good to go, once .NET 7 is released later this year.
There's a lot of test failed with something like
Expected exception message to match the equivalent of
"Expected collection1[3]*to be "three" with a length of 5, but "one" has a length of 3*", but
"Expected root[3] to be "three" with a length of 5, but "one" has a length of 3, differs near "one" (index 0).
So it looks like something is broke our CallerIdentifier
.
The problem happens consistently when running test in parallel, but they pass if run individually.
It might be something related to dotnet/runtime#70742 but I haven't been able to verify.
Complete minimal example reproducing the issue
Complete means the code snippet can be copied into a unit test method in a fresh C# project and run.
Minimal means it is stripped from code not related to reproducing the issue.
E.g.
// Arrange
string input = "MyString";
// Act
char result = input[0];
// Assert
result.Should().Be('M');
Expected behavior:
[What you expect to happen]
Actual behavior:
[What actually happens]
Versions
- Which version of Fluent Assertions are you using?
- Which .NET runtime and version are you targeting? E.g. .NET framework 4.6.1 or .NET Core 2.1.
Additional Information
Any additional information, configuration or data that might be necessary to reproduce the issue.