@@ -91,7 +91,8 @@ public class CollectionTests
9191 newAssertion : "actual.Should().NotContain(x => x.BooleanProperty{0});" ) ]
9292 [ AssertionCodeFix (
9393 oldAssertion : "actual.Should().OnlyContain(x => !x.BooleanProperty{0});" ,
94- newAssertion : "actual.Should().NotContain(x => x.BooleanProperty{0});" ) ]
94+ newAssertion : "actual.Should().NotContain(x => x.BooleanProperty{0});" ,
95+ ignore : true ) ]
9596 [ AssertionCodeFix (
9697 oldAssertion : "actual.AsEnumerable().Any(x => x.BooleanProperty).Should().BeFalse({0}).And.ToString();" ,
9798 newAssertion : "actual.AsEnumerable().Should().NotContain(x => x.BooleanProperty{0}).And.ToString();" ) ]
@@ -100,7 +101,8 @@ public class CollectionTests
100101 newAssertion : "actual.AsEnumerable().Should().NotContain(x => x.BooleanProperty{0}).And.ToString();" ) ]
101102 [ AssertionCodeFix (
102103 oldAssertion : "actual.AsEnumerable().Should().OnlyContain(x => !x.BooleanProperty{0}).And.ToString();" ,
103- newAssertion : "actual.AsEnumerable().Should().NotContain(x => x.BooleanProperty{0}).And.ToString();" ) ]
104+ newAssertion : "actual.AsEnumerable().Should().NotContain(x => x.BooleanProperty{0}).And.ToString();" ,
105+ ignore : true ) ]
104106 [ Implemented ]
105107 public void CollectionShouldNotContainProperty_TestCodeFix ( string oldAssertion , string newAssertion ) => VerifyCSharpFix < CollectionShouldNotContainPropertyCodeFix , CollectionShouldNotContainPropertyAnalyzer > ( oldAssertion , newAssertion ) ;
106108
@@ -191,14 +193,13 @@ public class CollectionTests
191193 [ AssertionCodeFix (
192194 oldAssertion : "actual.Count().Should().BeGreaterThan(6{0});" ,
193195 newAssertion : "actual.Should().HaveCountGreaterThan(6{0});" ) ]
194- [ Implemented ]
195196 [ AssertionCodeFix (
196197 oldAssertion : "actual.AsEnumerable().Count().Should().BeGreaterThan(k{0}).And.ToString();" ,
197198 newAssertion : "actual.AsEnumerable().Should().HaveCountGreaterThan(k{0}).And.ToString();" ) ]
198199 [ AssertionCodeFix (
199200 oldAssertion : "actual.AsEnumerable().Count().Should().BeGreaterThan(6{0}).And.ToString();" ,
200201 newAssertion : "actual.AsEnumerable().Should().HaveCountGreaterThan(6{0}).And.ToString();" ) ]
201- [ Ignore ( "Will be available in Fluent Assertions 5.0" ) ]
202+ [ Implemented , Ignore ( "Will be available in Fluent Assertions 5.0" ) ]
202203 public void CollectionShouldHaveCountGreaterThan_TestCodeFix ( string oldAssertion , string newAssertion ) => VerifyCSharpFix < CollectionShouldHaveCountGreaterThanCodeFix , CollectionShouldHaveCountGreaterThanAnalyzer > ( oldAssertion , newAssertion ) ;
203204
204205 [ AssertionDataTestMethod ]
@@ -216,14 +217,13 @@ public class CollectionTests
216217 [ AssertionCodeFix (
217218 oldAssertion : "actual.Count().Should().BeGreaterOrEqualTo(6{0});" ,
218219 newAssertion : "actual.Should().HaveCountGreaterOrEqualTo(6{0});" ) ]
219- [ Implemented ]
220220 [ AssertionCodeFix (
221221 oldAssertion : "actual.AsEnumerable().Count().Should().BeGreaterOrEqualTo(k{0}).And.ToString();" ,
222222 newAssertion : "actual.AsEnumerable().Should().HaveCountGreaterOrEqualTo(k{0}).And.ToString();" ) ]
223223 [ AssertionCodeFix (
224224 oldAssertion : "actual.AsEnumerable().Count().Should().BeGreaterOrEqualTo(6{0}).And.ToString();" ,
225225 newAssertion : "actual.AsEnumerable().Should().HaveCountGreaterOrEqualTo(6{0}).And.ToString();" ) ]
226- [ Ignore ( "Will be available in Fluent Assertions 5.0" ) ]
226+ [ Implemented , Ignore ( "Will be available in Fluent Assertions 5.0" ) ]
227227 public void CollectionShouldHaveCountGreaterOrEqualTo_TestCodeFix ( string oldAssertion , string newAssertion ) => VerifyCSharpFix < CollectionShouldHaveCountGreaterOrEqualToCodeFix , CollectionShouldHaveCountGreaterOrEqualToAnalyzer > ( oldAssertion , newAssertion ) ;
228228
229229 [ AssertionDataTestMethod ]
@@ -241,14 +241,13 @@ public class CollectionTests
241241 [ AssertionCodeFix (
242242 oldAssertion : "actual.Count().Should().BeLessThan(6{0});" ,
243243 newAssertion : "actual.Should().HaveCountLessThan(6{0});" ) ]
244- [ Implemented ]
245244 [ AssertionCodeFix (
246245 oldAssertion : "actual.AsEnumerable().Count().Should().BeLessThan(k{0}).And.ToString();" ,
247246 newAssertion : "actual.AsEnumerable().Should().HaveCountLessThan(k{0}).And.ToString();" ) ]
248247 [ AssertionCodeFix (
249248 oldAssertion : "actual.AsEnumerable().Count().Should().BeLessThan(6{0}).And.ToString();" ,
250249 newAssertion : "actual.AsEnumerable().Should().HaveCountLessThan(6{0}).And.ToString();" ) ]
251- [ Ignore ( "Will be available in Fluent Assertions 5.0" ) ]
250+ [ Implemented , Ignore ( "Will be available in Fluent Assertions 5.0" ) ]
252251 public void CollectionShouldHaveCountLessThan_TestCodeFix ( string oldAssertion , string newAssertion ) => VerifyCSharpFix < CollectionShouldHaveCountLessThanCodeFix , CollectionShouldHaveCountLessThanAnalyzer > ( oldAssertion , newAssertion ) ;
253252
254253 [ AssertionDataTestMethod ]
@@ -266,14 +265,13 @@ public class CollectionTests
266265 [ AssertionCodeFix (
267266 oldAssertion : "actual.Count().Should().BeLessOrEqualTo(6{0});" ,
268267 newAssertion : "actual.Should().HaveCountLessOrEqualTo(6{0});" ) ]
269- [ Implemented ]
270268 [ AssertionCodeFix (
271269 oldAssertion : "actual.AsEnumerable().Count().Should().BeLessOrEqualTo(k{0}).And.ToString();" ,
272270 newAssertion : "actual.AsEnumerable().Should().HaveCountLessOrEqualTo(k{0}).And.ToString();" ) ]
273271 [ AssertionCodeFix (
274272 oldAssertion : "actual.AsEnumerable().Count().Should().BeLessOrEqualTo(6{0}).And.ToString();" ,
275273 newAssertion : "actual.AsEnumerable().Should().HaveCountLessOrEqualTo(6{0}).And.ToString();" ) ]
276- [ Ignore ( "Will be available in Fluent Assertions 5.0" ) ]
274+ [ Implemented , Ignore ( "Will be available in Fluent Assertions 5.0" ) ]
277275 public void CollectionShouldHaveCountLessOrEqualTo_TestCodeFix ( string oldAssertion , string newAssertion ) => VerifyCSharpFix < CollectionShouldHaveCountLessOrEqualToCodeFix , CollectionShouldHaveCountLessOrEqualToAnalyzer > ( oldAssertion , newAssertion ) ;
278276
279277 [ AssertionDataTestMethod ]
@@ -291,14 +289,13 @@ public class CollectionTests
291289 [ AssertionCodeFix (
292290 oldAssertion : "actual.Count().Should().NotBe(6{0});" ,
293291 newAssertion : "actual.Should().NotHaveCount(6{0});" ) ]
294- [ Implemented ]
295292 [ AssertionCodeFix (
296293 oldAssertion : "actual.AsEnumerable().Count().Should().NotBe(k{0}).And.ToString();" ,
297294 newAssertion : "actual.AsEnumerable().Should().NotHaveCount(k{0}).And.ToString();" ) ]
298295 [ AssertionCodeFix (
299296 oldAssertion : "actual.AsEnumerable().Count().Should().NotBe(6{0}).And.ToString();" ,
300297 newAssertion : "actual.AsEnumerable().Should().NotHaveCount(6{0}).And.ToString();" ) ]
301- [ Ignore ( "Will be available in Fluent Assertions 5.0" ) ]
298+ [ Implemented , Ignore ( "Will be available in Fluent Assertions 5.0" ) ]
302299 public void CollectionShouldNotHaveCount_TestCodeFix ( string oldAssertion , string newAssertion ) => VerifyCSharpFix < CollectionShouldNotHaveCountCodeFix , CollectionShouldNotHaveCountAnalyzer > ( oldAssertion , newAssertion ) ;
303300
304301 [ AssertionDataTestMethod ]
@@ -327,11 +324,10 @@ public class CollectionTests
327324 [ AssertionCodeFix (
328325 oldAssertion : "actual.Count().Should().NotBe(unexpected.Count(){0});" ,
329326 newAssertion : "actual.Should().NotHaveSameCount(unexpected{0});" ) ]
330- [ Implemented ]
331327 [ AssertionCodeFix (
332328 oldAssertion : "actual.AsEnumerable().Count().Should().NotBe(unexpected.Count(){0}).And.ToString();" ,
333329 newAssertion : "actual.AsEnumerable().Should().NotHaveSameCount(unexpected{0}).And.ToString();" ) ]
334- [ Ignore ( "Will be available in Fluent Assertions 5.0" ) ]
330+ [ Implemented , Ignore ( "Will be available in Fluent Assertions 5.0" ) ]
335331 public void CollectionShouldNotHaveSameCount_TestCodeFix ( string oldAssertion , string newAssertion ) => VerifyCSharpFix < CollectionShouldNotHaveSameCountCodeFix , CollectionShouldNotHaveSameCountAnalyzer > ( oldAssertion , newAssertion ) ;
336332
337333 [ AssertionDataTestMethod ]
@@ -374,14 +370,22 @@ public class CollectionTests
374370 oldAssertion : "actual.Should().NotBeEmpty().And.NotBeNull({0});" ,
375371 newAssertion : "actual.Should().NotBeNullOrEmpty({0});" ) ]
376372 [ AssertionCodeFix (
377- oldAssertion : "actual.AsEnumerable().Should().NotBeNull().And.NotBeEmpty({0}).And.ToString();" ,
378- newAssertion : "actual.AsEnumerable().Should().NotBeNullOrEmpty({0}).And.ToString();" ) ]
373+ oldAssertion : "actual.Should().NotBeNull({0}).And.NotBeEmpty();" ,
374+ newAssertion : "actual.Should().NotBeNullOrEmpty({0});" ) ]
375+ [ AssertionCodeFix (
376+ oldAssertion : "actual.Should().NotBeEmpty({0}).And.NotBeNull();" ,
377+ newAssertion : "actual.Should().NotBeNullOrEmpty({0});" ) ]
378+ [ AssertionCodeFix (
379+ oldAssertion : "actual.AsEnumerable().Should().NotBeNull().And.HaveCount(2).And.NotBeEmpty({0}).And.ToString();" ,
380+ newAssertion : "actual.AsEnumerable().Should().NotBeNullOrEmpty({0}).And.HaveCount(2).And.ToString();" ) ]
379381 [ AssertionCodeFix (
380- oldAssertion : "actual.AsEnumerable().Should().NotBeEmpty().And.NotBeNull({0}).And.ToString();" ,
381- newAssertion : "actual.AsEnumerable().Should().NotBeNullOrEmpty({0}).And.ToString();" ) ]
382+ oldAssertion : "actual.AsEnumerable().Should().NotBeEmpty().And.HaveCount(2).And. NotBeNull({0}).And.ToString();" ,
383+ newAssertion : "actual.AsEnumerable().Should().NotBeNullOrEmpty({0}).And.HaveCount(2).And. ToString();" ) ]
382384 [ Implemented ]
383385 public void CollectionShouldNotBeNullOrEmpty_TestCodeFix ( string oldAssertion , string newAssertion ) => VerifyCSharpFix < CollectionShouldNotBeNullOrEmptyCodeFix , CollectionShouldNotBeNullOrEmptyAnalyzer > ( oldAssertion , newAssertion ) ;
384386
387+ public void CollectionShouldNotBeNullOrEmptyMultipleReasons_TestCodeFix ( string oldAssertion , string newAssertion ) => VerifyCSharpFix < CollectionShouldNotBeNullOrEmptyCodeFix , CollectionShouldNotBeNullOrEmptyAnalyzer > ( oldAssertion , newAssertion ) ;
388+
385389 [ AssertionDataTestMethod ]
386390 [ AssertionDiagnostic ( "actual.ElementAt(k).Should().Be(expectedItem{0});" ) ]
387391 [ AssertionDiagnostic ( "actual.ElementAt(6).Should().Be(expectedItem{0});" ) ]
@@ -424,11 +428,11 @@ public class CollectionTests
424428 oldAssertion : "actual.AsEnumerable().ElementAt(6).Should().Be(expectedItem{0}).And.ToString();" ,
425429 newAssertion : "actual.AsEnumerable().Should().HaveElementAt(6, expectedItem{0}).And.ToString();" ) ]
426430 [ AssertionCodeFix (
427- oldAssertion : "actual[k].Should().Be(expectedItem{0}).And.ToString();" ,
428- newAssertion : "actual.AsEnumerable ().Should().HaveElementAt(k, expectedItem{0}).And.ToString();" ) ]
431+ oldAssertion : "actual.ToArray() [k].Should().Be(expectedItem{0}).And.ToString();" ,
432+ newAssertion : "actual.ToArray ().Should().HaveElementAt(k, expectedItem{0}).And.ToString();" ) ]
429433 [ AssertionCodeFix (
430- oldAssertion : "actual[6].Should().Be(expectedItem{0}).And.ToString();" ,
431- newAssertion : "actual.AsEnumerable ().Should().HaveElementAt(6, expectedItem{0}).And.ToString();" ) ]
434+ oldAssertion : "actual.ToArray() [6].Should().Be(expectedItem{0}).And.ToString();" ,
435+ newAssertion : "actual.ToArray ().Should().HaveElementAt(6, expectedItem{0}).And.ToString();" ) ]
432436 [ AssertionCodeFix (
433437 oldAssertion : "actual.AsEnumerable().Skip(k).First().Should().Be(expectedItem{0}).And.ToString();" ,
434438 newAssertion : "actual.AsEnumerable().Should().HaveElementAt(k, expectedItem{0}).And.ToString();" ) ]
@@ -528,11 +532,10 @@ public class CollectionTests
528532 [ AssertionCodeFix (
529533 oldAssertion : "actual.Select(x => x.BooleanProperty).Should().NotContainNulls({0});" ,
530534 newAssertion : "actual.Should().NotContainNulls(x => x.BooleanProperty{0});" ) ]
531- [ Implemented ]
532535 [ AssertionCodeFix (
533536 oldAssertion : "actual.AsEnumerable().Select(x => x.BooleanProperty).Should().NotContainNulls({0}).And.ToString();" ,
534537 newAssertion : "actual.AsEnumerable().Should().NotContainNulls(x => x.BooleanProperty{0}).And.ToString();" ) ]
535- [ Ignore ( "Will be available in Fluent Assertions 5.0" ) ]
538+ [ Implemented , Ignore ( "Will be available in Fluent Assertions 5.0" ) ]
536539 public void CollectionShouldNotContainNulls_TestCodeFix ( string oldAssertion , string newAssertion ) => VerifyCSharpFix < CollectionShouldNotContainNullsCodeFix , CollectionShouldNotContainNullsAnalyzer > ( oldAssertion , newAssertion ) ;
537540
538541 [ AssertionDataTestMethod ]
0 commit comments