Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify result.Count #7

Open
DmitriyMaksimov opened this issue Jun 24, 2022 · 1 comment
Open

Simplify result.Count #7

DmitriyMaksimov opened this issue Jun 24, 2022 · 1 comment
Labels
help wanted Extra attention is needed

Comments

@DmitriyMaksimov
Copy link

Assertion:

Assert.That(result.Count, Is.EqualTo(2));

can be replaced with:

result.Should().HaveCount(2);

now it replaced with:

result.Count.Should().Be(2);
@DmitriyMaksimov DmitriyMaksimov changed the title Simplify Simplify result.Count Jun 24, 2022
@meziantou meziantou added the help wanted Extra attention is needed label Jun 24, 2022
@Greg-Smulko
Copy link
Contributor

A workaround for now could be to use FluentAssertions Analyzers:

image

But yes, I agree that it would be useful. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants