Use MSTest recommended analyzers by Evangelink · Pull Request #15539 · microsoft/vstest (original) (raw)
added 2 commits
Copilot AI review requested due to automatic review settings
The MSTest v3 Assert methods use a different parameter order than the classic APIs they replaced:
- Assert.StartsWith/EndsWith(expected, actual) vs StringAssert.StartsWith/EndsWith(value, substring)
- Assert.Contains/DoesNotContain(substring, value) vs StringAssert.Contains(value, substring) and Assert.IsTrue(value.Contains(substring))
- Assert.IsGreaterThan/IsLessThan(bound, value) vs Assert.IsTrue(value > bound)
- Assert.DoesNotEndWith(notExpected, actual) vs Assert.IsFalse(actual.EndsWith(notExpected))
All conversions from StringAssert.StartsWith/EndsWith, Assert.IsTrue(x.Contains/EndsWith/StartsWith), Assert.IsTrue(x > y), and Assert.IsFalse(x.Contains/EndsWith) now have their parameters in the correct order.
Co-authored-by: Copilot 223556219+Copilot@users.noreply.github.com
Copilot AI review requested due to automatic review settings
Copilot AI review requested due to automatic review settings
Evangelink deleted the dev/amauryleve/mstest-analyzers branch
This was referenced
Mar 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
[ Show hidden characters]({{ revealButtonHref }})