Created
March 23, 2015 07:08
-
-
Save philippdolder/38140c786a9384053bfd to your computer and use it in GitHub Desktop.
R# SSP: MsTest to FluentAssertions collection count
This file contains 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
The expression in the code looks like this: | |
var list = new List<string>(); | |
Assert.AreEqual(3, list.Count); | |
Search part of ssp: | |
Assert.AreEqual($expected$, $actual$.Count); | |
both variables match "exactly one argument". I've turned on "Match similar constructs" | |
Replace part of ssp: | |
$actual$.Should().HaveCount($expected$); | |
But it doesn't find the pattern. | |
Ideas? |
I'm using R# 8.2.3, can't update at the moment.
I have the parameters set as "Argument placeholder". Will try your suggestion, thanks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
How are you defining the parameters? I think what R# auto-suggests is incorrect.
Both
$expected$
and$actual$
should be Identifier placeholders.Edit: though having
$actual$
as expression works also.What R# version are you using?