@@ -187,8 +187,12 @@ public class CollectionTests
187
187
[ AssertionDataTestMethod ]
188
188
[ AssertionDiagnostic ( "actual.Count().Should().Be(k{0});" ) ]
189
189
[ 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});" ) ]
190
192
[ AssertionDiagnostic ( "actual.AsEnumerable().Count().Should().Be(k{0}).And.ToString();" ) ]
191
193
[ 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();" ) ]
192
196
[ Implemented ]
193
197
public void CollectionShouldHaveCount_TestAnalyzer ( string assertion ) => VerifyCSharpDiagnosticCodeBlock < CollectionShouldHaveCountAnalyzer > ( assertion ) ;
194
198
@@ -205,6 +209,12 @@ public class CollectionTests
205
209
[ AssertionCodeFix (
206
210
oldAssertion : "actual.Count().Should().Be(6{0});" ,
207
211
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();" ) ]
208
218
[ AssertionCodeFix (
209
219
oldAssertion : "actual.AsEnumerable().Count().Should().Be(k{0}).And.ToString();" ,
210
220
newAssertion : "actual.AsEnumerable().Should().HaveCount(k{0}).And.ToString();" ) ]
@@ -217,6 +227,9 @@ public class CollectionTests
217
227
[ AssertionCodeFix (
218
228
oldAssertion : "actual.AsEnumerable().Count().Should().Be(6{0}).And.ToString();" ,
219
229
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();" ) ]
220
233
[ Implemented ]
221
234
public void CollectionShouldHaveCount_TestCodeFix ( string oldAssertion , string newAssertion ) => VerifyCSharpFixCodeBlock < CollectionShouldHaveCountCodeFix , CollectionShouldHaveCountAnalyzer > ( oldAssertion , newAssertion ) ;
222
235
0 commit comments