fluentassertions / fluentassertions/fluentassertions.analyzers

Missing negation when transforming OnlyContain

Open
#2 2 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
C#
Stars
131
Forks
25
PR merge metrics
No merged PRs in 30d

Description

When applying the codefix for `CollectionShouldNotContainProperty`, the comparison inside the lambda should also be negated.

```c#
actual.Should().OnlyContain(x => x.OtherProperty == expectedValue); // before
actual.Should().NotContain(x => x.OtherProperty == expectedValue); // after
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.