Skip to content

Commit

Permalink
bugfix: and test for #96 (#289)
Browse files Browse the repository at this point in the history
* bugfix: and test for #96

* bugfix: and test for #96
  • Loading branch information
Meir017 authored Jan 10, 2024
1 parent c19bd3c commit 0522cc9
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/FluentAssertions.Analyzers.Tests/Tips/CollectionTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -629,6 +629,12 @@ public void CollectionShouldContainSingle_TestAnalyzer_GenericIEnumerableShouldR
[AssertionCodeFix(
oldAssertion: "actual.ToList().Should().HaveCount(1{0}).And.ToString();",
newAssertion: "actual.ToList().Should().ContainSingle({0}).And.ToString();")]
[AssertionCodeFix(
oldAssertion: "actual.Should().HaveCount(1{0}).And.Contain(item => item == expectedItem);",
newAssertion: "actual.Should().ContainSingle({0}).And.Contain(item => item == expectedItem);")]
[AssertionCodeFix(
oldAssertion: "actual.AsEnumerable().Should().HaveCount(1{0}).And.Contain(item => item == expectedItem).And.ToString();",
newAssertion: "actual.AsEnumerable().Should().ContainSingle({0}).And.Contain(item => item == expectedItem).And.ToString();")]
[Implemented]
public void CollectionShouldContainSingle_TestCodeFix(string oldAssertion, string newAssertion) => VerifyCSharpFixCodeBlock(oldAssertion, newAssertion);

Expand Down

0 comments on commit 0522cc9

Please sign in to comment.