Skip to content

Commit 0522cc9

Browse files
authored
bugfix: and test for #96 (#289)
* bugfix: and test for #96 * bugfix: and test for #96
1 parent c19bd3c commit 0522cc9

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/FluentAssertions.Analyzers.Tests/Tips/CollectionTests.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -629,6 +629,12 @@ public void CollectionShouldContainSingle_TestAnalyzer_GenericIEnumerableShouldR
629629
[AssertionCodeFix(
630630
oldAssertion: "actual.ToList().Should().HaveCount(1{0}).And.ToString();",
631631
newAssertion: "actual.ToList().Should().ContainSingle({0}).And.ToString();")]
632+
[AssertionCodeFix(
633+
oldAssertion: "actual.Should().HaveCount(1{0}).And.Contain(item => item == expectedItem);",
634+
newAssertion: "actual.Should().ContainSingle({0}).And.Contain(item => item == expectedItem);")]
635+
[AssertionCodeFix(
636+
oldAssertion: "actual.AsEnumerable().Should().HaveCount(1{0}).And.Contain(item => item == expectedItem).And.ToString();",
637+
newAssertion: "actual.AsEnumerable().Should().ContainSingle({0}).And.Contain(item => item == expectedItem).And.ToString();")]
632638
[Implemented]
633639
public void CollectionShouldContainSingle_TestCodeFix(string oldAssertion, string newAssertion) => VerifyCSharpFixCodeBlock(oldAssertion, newAssertion);
634640

0 commit comments

Comments
 (0)