@@ -56,6 +56,7 @@ public class CollectionTests
56
56
[ AssertionDataTestMethod ]
57
57
[ AssertionDiagnostic ( "actual.Any(x => x.BooleanProperty).Should().BeFalse({0});" ) ]
58
58
[ AssertionDiagnostic ( "actual.Where(x => x.BooleanProperty).Should().BeEmpty({0});" ) ]
59
+ [ AssertionDiagnostic ( "actual.Should().OnlyContain(x => !x.BooleanProperty{0});" ) ]
59
60
[ Implemented ]
60
61
public void CollectionShouldNotContainProperty_TestAnalyzer ( string assertion ) => VerifyCSharpDiagnostic < CollectionShouldNotContainPropertyAnalyzer > ( assertion ) ;
61
62
@@ -65,7 +66,10 @@ public class CollectionTests
65
66
newAssertion : "actual.Should().NotContain(x => x.BooleanProperty{0});" ) ]
66
67
[ AssertionCodeFix (
67
68
oldAssertion : "actual.Where(x => x.BooleanProperty).Should().BeEmpty({0});" ,
68
- newAssertion : "actual.Should().NotContain(x => x.BooleanProperty{0});" ) ]
69
+ newAssertion : "actual.Should().NotContain(x => x.BooleanProperty{0});" ) ]
70
+ [ AssertionCodeFix (
71
+ oldAssertion : "actual.Should().OnlyContain(x => !x.BooleanProperty{0});" ,
72
+ newAssertion : "actual.Should().NotContain(x => x.BooleanProperty{0});" ) ]
69
73
[ Implemented ]
70
74
public void CollectionShouldNotContainProperty_TestCodeFix ( string oldAssertion , string newAssertion ) => VerifyCSharpFix < CollectionShouldNotContainPropertyCodeFix , CollectionShouldNotContainPropertyAnalyzer > ( oldAssertion , newAssertion ) ;
71
75
@@ -241,7 +245,7 @@ public class CollectionTests
241
245
[ Implemented ]
242
246
[ Ignore ( "Will be available in Fluent Assertions 5.0" ) ]
243
247
public void CollectionShouldNotHaveSameCount_TestCodeFix ( string oldAssertion , string newAssertion ) => VerifyCSharpFix < CollectionShouldNotHaveSameCountCodeFix , CollectionShouldNotHaveSameCountAnalyzer > ( oldAssertion , newAssertion ) ;
244
-
248
+
245
249
[ AssertionDataTestMethod ]
246
250
[ AssertionDiagnostic ( "actual.Where(x => x.BooleanProperty).Should().HaveCount(1{0});" ) ]
247
251
[ Implemented ]
@@ -253,19 +257,7 @@ public class CollectionTests
253
257
newAssertion : "actual.Should().ContainSingle(x => x.BooleanProperty{0});" ) ]
254
258
[ Implemented ]
255
259
public void CollectionShouldContainSingleProperty_TestCodeFix ( string oldAssertion , string newAssertion ) => VerifyCSharpFix < CollectionShouldContainSinglePropertyCodeFix , CollectionShouldContainSinglePropertyAnalyzer > ( oldAssertion , newAssertion ) ;
256
-
257
- [ AssertionDataTestMethod ]
258
- [ AssertionDiagnostic ( "actual.Should().OnlyContain(e => !e.BooleanProperty{0});" ) ]
259
- [ NotImplemented ]
260
- public void CollectionShouldNotContainProperty_TestAnalyzer03 ( string assertion ) => VerifyCSharpDiagnostic < CollectionShouldNotContainPropertyAnalyzer > ( assertion ) ;
261
-
262
- [ AssertionDataTestMethod ]
263
- [ AssertionCodeFix (
264
- oldAssertion : "actual.Should().OnlyContain(e => !e.BooleanProperty{0});" ,
265
- newAssertion : "actual.Should().NotContain(x => x.BooleanProperty{0});" ) ]
266
- [ NotImplemented ]
267
- public void CollectionShouldNotContainProperty_TestCodeFix03 ( string oldAssertion , string newAssertion ) => VerifyCSharpFix < CollectionShouldNotContainPropertyCodeFix , CollectionShouldNotContainPropertyAnalyzer > ( oldAssertion , newAssertion ) ;
268
-
260
+
269
261
[ AssertionDataTestMethod ]
270
262
[ AssertionDiagnostic ( "actual.Should().NotBeNull().And.NotBeEmpty({0});" ) ]
271
263
[ NotImplemented ]
@@ -280,40 +272,36 @@ public class CollectionTests
280
272
281
273
[ AssertionDataTestMethod ]
282
274
[ AssertionDiagnostic ( "actual.ElementAt(k).Should().Be(expectedItem{0});" ) ]
283
- [ NotImplemented ]
275
+ [ AssertionDiagnostic ( "actual.ElementAt(6).Should().Be(expectedItem{0});" ) ]
276
+ [ AssertionDiagnostic ( "actual[k].Should().Be(expectedItem{0});" ) ]
277
+ [ AssertionDiagnostic ( "actual[6].Should().Be(expectedItem{0});" ) ]
278
+ [ AssertionDiagnostic ( "actual.Skip(k).First().Should().Be(expectedItem{0});" ) ]
279
+ [ AssertionDiagnostic ( "actual.Skip(6).First().Should().Be(expectedItem{0});" ) ]
280
+ [ Implemented ]
284
281
public void CollectionShouldHaveElementAt_TestAnalyzer ( string assertion ) => VerifyCSharpDiagnostic < CollectionShouldHaveElementAtAnalyzer > ( assertion ) ;
285
282
286
283
[ AssertionDataTestMethod ]
287
284
[ AssertionCodeFix (
288
- oldAssertion : "actual.ElementAt(k).Should().Be(expectedItem{0});" ,
289
- newAssertion : "actual.Should().HaveElementAt(k, expectedItem{0});" ) ]
290
- [ NotImplemented ]
291
- public void CollectionShouldHaveElementAt_TestCodeFix ( string oldAssertion , string newAssertion ) => VerifyCSharpFix < CollectionShouldHaveElementAtCodeFix , CollectionShouldHaveElementAtAnalyzer > ( oldAssertion , newAssertion ) ;
292
-
293
- [ AssertionDataTestMethod ]
294
- [ AssertionDiagnostic ( "actual[k].Should().Be(expectedItem{0});" ) ]
295
- [ NotImplemented ]
296
- public void CollectionShouldHaveElementAt_TestAnalyzer02 ( string assertion ) => VerifyCSharpDiagnostic < CollectionShouldHaveElementAtAnalyzer > ( assertion ) ;
297
-
298
- [ AssertionDataTestMethod ]
285
+ oldAssertion : "actual.ElementAt(k).Should().Be(expectedItem{0});" ,
286
+ newAssertion : "actual.Should().HaveElementAt(k, expectedItem{0});" ) ]
299
287
[ AssertionCodeFix (
300
- oldAssertion : "actual[k].Should().Be(expectedItem{0});" ,
301
- newAssertion : "actual.Should().HaveElementAt(k, expectedItem{0});" ) ]
302
- [ NotImplemented ]
303
- public void CollectionShouldHaveElementAt_TestCodeFix02 ( string oldAssertion , string newAssertion ) => VerifyCSharpFix < CollectionShouldHaveElementAtCodeFix , CollectionShouldHaveElementAtAnalyzer > ( oldAssertion , newAssertion ) ;
304
-
305
- [ AssertionDataTestMethod ]
306
- [ AssertionDiagnostic ( "actual.Skip(k).First().Should().Be(expectedItem{0});" ) ]
307
- [ NotImplemented ]
308
- public void CollectionShouldHaveElementAt_TestAnalyzer03 ( string assertion ) => VerifyCSharpDiagnostic < CollectionShouldHaveElementAtAnalyzer > ( assertion ) ;
309
-
310
- [ AssertionDataTestMethod ]
288
+ oldAssertion : "actual.ElementAt(6).Should().Be(expectedItem{0});" ,
289
+ newAssertion : "actual.Should().HaveElementAt(6, expectedItem{0});" ) ]
311
290
[ AssertionCodeFix (
312
- oldAssertion : "actual.Skip(k).First().Should().Be(expectedItem{0});" ,
313
- newAssertion : "actual.Should().HaveElementAt(k, expectedItem{0});" ) ]
314
- [ NotImplemented ]
315
- public void CollectionShouldHaveElementAt_TestCodeFix03 ( string oldAssertion , string newAssertion ) => VerifyCSharpFix < CollectionShouldHaveElementAtCodeFix , CollectionShouldHaveElementAtAnalyzer > ( oldAssertion , newAssertion ) ;
316
-
291
+ oldAssertion : "actual[k].Should().Be(expectedItem{0});" ,
292
+ newAssertion : "actual.Should().HaveElementAt(k, expectedItem{0});" ) ]
293
+ [ AssertionCodeFix (
294
+ oldAssertion : "actual[6].Should().Be(expectedItem{0});" ,
295
+ newAssertion : "actual.Should().HaveElementAt(6, expectedItem{0});" ) ]
296
+ [ AssertionCodeFix (
297
+ oldAssertion : "actual.Skip(k).First().Should().Be(expectedItem{0});" ,
298
+ newAssertion : "actual.Should().HaveElementAt(k, expectedItem{0});" ) ]
299
+ [ AssertionCodeFix (
300
+ oldAssertion : "actual.Skip(6).First().Should().Be(expectedItem{0});" ,
301
+ newAssertion : "actual.Should().HaveElementAt(6, expectedItem{0});" ) ]
302
+ [ Implemented ]
303
+ public void CollectionShouldHaveElementAt_TestCodeFix ( string oldAssertion , string newAssertion ) => VerifyCSharpFix < CollectionShouldHaveElementAtCodeFix , CollectionShouldHaveElementAtAnalyzer > ( oldAssertion , newAssertion ) ;
304
+
317
305
[ AssertionDataTestMethod ]
318
306
[ AssertionDiagnostic ( "actual.OrderBy(x => x.BooleanProperty).Should().Equal(actual{0});" ) ]
319
307
[ Implemented ]
0 commit comments