@@ -187,8 +187,12 @@ public class CollectionTests
187187 [ AssertionDataTestMethod ]
188188 [ AssertionDiagnostic ( "actual.Count().Should().Be(k{0});" ) ]
189189 [ AssertionDiagnostic ( "actual.Count().Should().Be(6{0});" ) ]
190+ [ AssertionDiagnostic ( "actual.ToArray().Length.Should().Be(k{0});" ) ]
191+ [ AssertionDiagnostic ( "actual.ToArray().Length.Should().Be(6{0});" ) ]
190192 [ AssertionDiagnostic ( "actual.AsEnumerable().Count().Should().Be(k{0}).And.ToString();" ) ]
191193 [ AssertionDiagnostic ( "actual.AsEnumerable().Count().Should().Be(6{0}).And.ToString();" ) ]
194+ [ AssertionDiagnostic ( "actual.ToArray().Length.Should().Be(k{0}).And.ToString();" ) ]
195+ [ AssertionDiagnostic ( "actual.ToArray().Length.Should().Be(6{0}).And.ToString();" ) ]
192196 [ Implemented ]
193197 public void CollectionShouldHaveCount_TestAnalyzer ( string assertion ) => VerifyCSharpDiagnosticCodeBlock < CollectionShouldHaveCountAnalyzer > ( assertion ) ;
194198
@@ -205,6 +209,12 @@ public class CollectionTests
205209 [ AssertionCodeFix (
206210 oldAssertion : "actual.Count().Should().Be(6{0});" ,
207211 newAssertion : "actual.Should().HaveCount(6{0});" ) ]
212+ [ AssertionCodeFix (
213+ oldAssertion : "actual.ToArray().Length.Should().Be(6{0});" ,
214+ newAssertion : "actual.ToArray().Should().HaveCount(6{0});" ) ]
215+ [ AssertionCodeFix (
216+ oldAssertion : "actual.ToArray().Length.Should().Be(k{0}).And.ToString();" ,
217+ newAssertion : "actual.ToArray().Should().HaveCount(k{0}).And.ToString();" ) ]
208218 [ AssertionCodeFix (
209219 oldAssertion : "actual.AsEnumerable().Count().Should().Be(k{0}).And.ToString();" ,
210220 newAssertion : "actual.AsEnumerable().Should().HaveCount(k{0}).And.ToString();" ) ]
@@ -217,6 +227,9 @@ public class CollectionTests
217227 [ AssertionCodeFix (
218228 oldAssertion : "actual.AsEnumerable().Count().Should().Be(6{0}).And.ToString();" ,
219229 newAssertion : "actual.AsEnumerable().Should().HaveCount(6{0}).And.ToString();" ) ]
230+ [ AssertionCodeFix (
231+ oldAssertion : "actual.ToArray().Length.Should().Be(6{0}).And.ToString();" ,
232+ newAssertion : "actual.ToArray().Should().HaveCount(6{0}).And.ToString();" ) ]
220233 [ Implemented ]
221234 public void CollectionShouldHaveCount_TestCodeFix ( string oldAssertion , string newAssertion ) => VerifyCSharpFixCodeBlock < CollectionShouldHaveCountCodeFix , CollectionShouldHaveCountAnalyzer > ( oldAssertion , newAssertion ) ;
222235
0 commit comments