You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using FluentAssertions version 5.4.0 and FluentAssertions.Analyzers version 0.10.1. When I create a test that asserts the values in dictionaries, the analyzer incorrectly suggests I use HaveElementAt which doesn't compile, i.e. given this code:
@samcragg I'll be happy to receive a pull-request for this 😄
I think the solution should be to make the CollectionShouldHaveElementAtAnalyzer class (or even CollectionAnalyzer) method ShouldAnalyzeVariableType be more strict and exclude Dictionary
make sure you run just the tests with the Completed category
I'm using FluentAssertions version 5.4.0 and FluentAssertions.Analyzers version 0.10.1. When I create a test that asserts the values in dictionaries, the analyzer incorrectly suggests I use
HaveElementAt
which doesn't compile, i.e. given this code:The analyzer incorrectly suggests:
Perhaps it could suggest (though it's not simplifying but is more idiomatic):
Happy to take a stab at a PR
The text was updated successfully, but these errors were encountered: