@@ -91,7 +91,8 @@ public class CollectionTests
91
91
newAssertion : "actual.Should().NotContain(x => x.BooleanProperty{0});" ) ]
92
92
[ AssertionCodeFix (
93
93
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 ) ]
95
96
[ AssertionCodeFix (
96
97
oldAssertion : "actual.AsEnumerable().Any(x => x.BooleanProperty).Should().BeFalse({0}).And.ToString();" ,
97
98
newAssertion : "actual.AsEnumerable().Should().NotContain(x => x.BooleanProperty{0}).And.ToString();" ) ]
@@ -100,7 +101,8 @@ public class CollectionTests
100
101
newAssertion : "actual.AsEnumerable().Should().NotContain(x => x.BooleanProperty{0}).And.ToString();" ) ]
101
102
[ AssertionCodeFix (
102
103
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 ) ]
104
106
[ Implemented ]
105
107
public void CollectionShouldNotContainProperty_TestCodeFix ( string oldAssertion , string newAssertion ) => VerifyCSharpFix < CollectionShouldNotContainPropertyCodeFix , CollectionShouldNotContainPropertyAnalyzer > ( oldAssertion , newAssertion ) ;
106
108
@@ -191,14 +193,13 @@ public class CollectionTests
191
193
[ AssertionCodeFix (
192
194
oldAssertion : "actual.Count().Should().BeGreaterThan(6{0});" ,
193
195
newAssertion : "actual.Should().HaveCountGreaterThan(6{0});" ) ]
194
- [ Implemented ]
195
196
[ AssertionCodeFix (
196
197
oldAssertion : "actual.AsEnumerable().Count().Should().BeGreaterThan(k{0}).And.ToString();" ,
197
198
newAssertion : "actual.AsEnumerable().Should().HaveCountGreaterThan(k{0}).And.ToString();" ) ]
198
199
[ AssertionCodeFix (
199
200
oldAssertion : "actual.AsEnumerable().Count().Should().BeGreaterThan(6{0}).And.ToString();" ,
200
201
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" ) ]
202
203
public void CollectionShouldHaveCountGreaterThan_TestCodeFix ( string oldAssertion , string newAssertion ) => VerifyCSharpFix < CollectionShouldHaveCountGreaterThanCodeFix , CollectionShouldHaveCountGreaterThanAnalyzer > ( oldAssertion , newAssertion ) ;
203
204
204
205
[ AssertionDataTestMethod ]
@@ -216,14 +217,13 @@ public class CollectionTests
216
217
[ AssertionCodeFix (
217
218
oldAssertion : "actual.Count().Should().BeGreaterOrEqualTo(6{0});" ,
218
219
newAssertion : "actual.Should().HaveCountGreaterOrEqualTo(6{0});" ) ]
219
- [ Implemented ]
220
220
[ AssertionCodeFix (
221
221
oldAssertion : "actual.AsEnumerable().Count().Should().BeGreaterOrEqualTo(k{0}).And.ToString();" ,
222
222
newAssertion : "actual.AsEnumerable().Should().HaveCountGreaterOrEqualTo(k{0}).And.ToString();" ) ]
223
223
[ AssertionCodeFix (
224
224
oldAssertion : "actual.AsEnumerable().Count().Should().BeGreaterOrEqualTo(6{0}).And.ToString();" ,
225
225
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" ) ]
227
227
public void CollectionShouldHaveCountGreaterOrEqualTo_TestCodeFix ( string oldAssertion , string newAssertion ) => VerifyCSharpFix < CollectionShouldHaveCountGreaterOrEqualToCodeFix , CollectionShouldHaveCountGreaterOrEqualToAnalyzer > ( oldAssertion , newAssertion ) ;
228
228
229
229
[ AssertionDataTestMethod ]
@@ -241,14 +241,13 @@ public class CollectionTests
241
241
[ AssertionCodeFix (
242
242
oldAssertion : "actual.Count().Should().BeLessThan(6{0});" ,
243
243
newAssertion : "actual.Should().HaveCountLessThan(6{0});" ) ]
244
- [ Implemented ]
245
244
[ AssertionCodeFix (
246
245
oldAssertion : "actual.AsEnumerable().Count().Should().BeLessThan(k{0}).And.ToString();" ,
247
246
newAssertion : "actual.AsEnumerable().Should().HaveCountLessThan(k{0}).And.ToString();" ) ]
248
247
[ AssertionCodeFix (
249
248
oldAssertion : "actual.AsEnumerable().Count().Should().BeLessThan(6{0}).And.ToString();" ,
250
249
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" ) ]
252
251
public void CollectionShouldHaveCountLessThan_TestCodeFix ( string oldAssertion , string newAssertion ) => VerifyCSharpFix < CollectionShouldHaveCountLessThanCodeFix , CollectionShouldHaveCountLessThanAnalyzer > ( oldAssertion , newAssertion ) ;
253
252
254
253
[ AssertionDataTestMethod ]
@@ -266,14 +265,13 @@ public class CollectionTests
266
265
[ AssertionCodeFix (
267
266
oldAssertion : "actual.Count().Should().BeLessOrEqualTo(6{0});" ,
268
267
newAssertion : "actual.Should().HaveCountLessOrEqualTo(6{0});" ) ]
269
- [ Implemented ]
270
268
[ AssertionCodeFix (
271
269
oldAssertion : "actual.AsEnumerable().Count().Should().BeLessOrEqualTo(k{0}).And.ToString();" ,
272
270
newAssertion : "actual.AsEnumerable().Should().HaveCountLessOrEqualTo(k{0}).And.ToString();" ) ]
273
271
[ AssertionCodeFix (
274
272
oldAssertion : "actual.AsEnumerable().Count().Should().BeLessOrEqualTo(6{0}).And.ToString();" ,
275
273
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" ) ]
277
275
public void CollectionShouldHaveCountLessOrEqualTo_TestCodeFix ( string oldAssertion , string newAssertion ) => VerifyCSharpFix < CollectionShouldHaveCountLessOrEqualToCodeFix , CollectionShouldHaveCountLessOrEqualToAnalyzer > ( oldAssertion , newAssertion ) ;
278
276
279
277
[ AssertionDataTestMethod ]
@@ -291,14 +289,13 @@ public class CollectionTests
291
289
[ AssertionCodeFix (
292
290
oldAssertion : "actual.Count().Should().NotBe(6{0});" ,
293
291
newAssertion : "actual.Should().NotHaveCount(6{0});" ) ]
294
- [ Implemented ]
295
292
[ AssertionCodeFix (
296
293
oldAssertion : "actual.AsEnumerable().Count().Should().NotBe(k{0}).And.ToString();" ,
297
294
newAssertion : "actual.AsEnumerable().Should().NotHaveCount(k{0}).And.ToString();" ) ]
298
295
[ AssertionCodeFix (
299
296
oldAssertion : "actual.AsEnumerable().Count().Should().NotBe(6{0}).And.ToString();" ,
300
297
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" ) ]
302
299
public void CollectionShouldNotHaveCount_TestCodeFix ( string oldAssertion , string newAssertion ) => VerifyCSharpFix < CollectionShouldNotHaveCountCodeFix , CollectionShouldNotHaveCountAnalyzer > ( oldAssertion , newAssertion ) ;
303
300
304
301
[ AssertionDataTestMethod ]
@@ -327,11 +324,10 @@ public class CollectionTests
327
324
[ AssertionCodeFix (
328
325
oldAssertion : "actual.Count().Should().NotBe(unexpected.Count(){0});" ,
329
326
newAssertion : "actual.Should().NotHaveSameCount(unexpected{0});" ) ]
330
- [ Implemented ]
331
327
[ AssertionCodeFix (
332
328
oldAssertion : "actual.AsEnumerable().Count().Should().NotBe(unexpected.Count(){0}).And.ToString();" ,
333
329
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" ) ]
335
331
public void CollectionShouldNotHaveSameCount_TestCodeFix ( string oldAssertion , string newAssertion ) => VerifyCSharpFix < CollectionShouldNotHaveSameCountCodeFix , CollectionShouldNotHaveSameCountAnalyzer > ( oldAssertion , newAssertion ) ;
336
332
337
333
[ AssertionDataTestMethod ]
@@ -374,14 +370,22 @@ public class CollectionTests
374
370
oldAssertion : "actual.Should().NotBeEmpty().And.NotBeNull({0});" ,
375
371
newAssertion : "actual.Should().NotBeNullOrEmpty({0});" ) ]
376
372
[ 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();" ) ]
379
381
[ 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();" ) ]
382
384
[ Implemented ]
383
385
public void CollectionShouldNotBeNullOrEmpty_TestCodeFix ( string oldAssertion , string newAssertion ) => VerifyCSharpFix < CollectionShouldNotBeNullOrEmptyCodeFix , CollectionShouldNotBeNullOrEmptyAnalyzer > ( oldAssertion , newAssertion ) ;
384
386
387
+ public void CollectionShouldNotBeNullOrEmptyMultipleReasons_TestCodeFix ( string oldAssertion , string newAssertion ) => VerifyCSharpFix < CollectionShouldNotBeNullOrEmptyCodeFix , CollectionShouldNotBeNullOrEmptyAnalyzer > ( oldAssertion , newAssertion ) ;
388
+
385
389
[ AssertionDataTestMethod ]
386
390
[ AssertionDiagnostic ( "actual.ElementAt(k).Should().Be(expectedItem{0});" ) ]
387
391
[ AssertionDiagnostic ( "actual.ElementAt(6).Should().Be(expectedItem{0});" ) ]
@@ -424,11 +428,11 @@ public class CollectionTests
424
428
oldAssertion : "actual.AsEnumerable().ElementAt(6).Should().Be(expectedItem{0}).And.ToString();" ,
425
429
newAssertion : "actual.AsEnumerable().Should().HaveElementAt(6, expectedItem{0}).And.ToString();" ) ]
426
430
[ 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();" ) ]
429
433
[ 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();" ) ]
432
436
[ AssertionCodeFix (
433
437
oldAssertion : "actual.AsEnumerable().Skip(k).First().Should().Be(expectedItem{0}).And.ToString();" ,
434
438
newAssertion : "actual.AsEnumerable().Should().HaveElementAt(k, expectedItem{0}).And.ToString();" ) ]
@@ -528,11 +532,10 @@ public class CollectionTests
528
532
[ AssertionCodeFix (
529
533
oldAssertion : "actual.Select(x => x.BooleanProperty).Should().NotContainNulls({0});" ,
530
534
newAssertion : "actual.Should().NotContainNulls(x => x.BooleanProperty{0});" ) ]
531
- [ Implemented ]
532
535
[ AssertionCodeFix (
533
536
oldAssertion : "actual.AsEnumerable().Select(x => x.BooleanProperty).Should().NotContainNulls({0}).And.ToString();" ,
534
537
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" ) ]
536
539
public void CollectionShouldNotContainNulls_TestCodeFix ( string oldAssertion , string newAssertion ) => VerifyCSharpFix < CollectionShouldNotContainNullsCodeFix , CollectionShouldNotContainNullsAnalyzer > ( oldAssertion , newAssertion ) ;
537
540
538
541
[ AssertionDataTestMethod ]
0 commit comments