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

Some Asserts.AreEqual in TestPlatform.sln have incorrect expected and actual arguments. #2328

Closed
HeroMaxPower opened this issue Feb 14, 2020 · 1 comment · Fixed by #2329
Closed

Comments

@HeroMaxPower
Copy link
Contributor

Im using static code analyser SonarLint for checking this project and i've come across a violation of this rule

SonarLint Rule 3415

in some of the tests for this project.

e.g.

Assert.AreEqual(aggregator.RunContextAttachments.Count, 1, "RunContextAttachments List must have data.");

should be

Assert.AreEqual(1, aggregator.RunContextAttachments.Count, "RunContextAttachments List must have data.");

I would like to fix these if i'm allowed.

@HeroMaxPower HeroMaxPower changed the title Some Asserts.AreEqual in TestPlatform.sln have incorrect expected and actual parameters. Some Asserts.AreEqual in TestPlatform.sln have incorrect expected and actual arguments. Feb 14, 2020
@nohwnd
Copy link
Member

nohwnd commented Feb 14, 2020

@HeroMaxPower thanks for the report, you are definitely allowed to PR this. The inconsistency among different testing frameworks probably caused this. I personally always have to double-check which of the params is expected in the assertion library the framework is using 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants