Skip to content

Analyzer suggest a fix, which is not possible to use #6754

@SaxoLigtorn

Description

@SaxoLigtorn

Analyzer suggested fix is not valid

Steps To Reproduce

  1. Open attached solution
  2. Build solution
  3. Check the Error List and you will find a "Use 'Assert.HasCount' instead of 'Assert.AreEqual' (https://learn.microsoft.com/dotnet/core/testing/mstest-analyzers/mstest0037)"

However HasCount don't support 2 IEnumables and the Assert.Equal seems to be the correct way of solving this

Expected behavior

Don't suggest moving to Assert.HasCount, but skip the warning

TestHasCountIssue.zip

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions