@@ -56,6 +56,7 @@ public class CollectionTests
5656 [ AssertionDataTestMethod ]
5757 [ AssertionDiagnostic ( "actual.Any(x => x.BooleanProperty).Should().BeFalse({0});" ) ]
5858 [ AssertionDiagnostic ( "actual.Where(x => x.BooleanProperty).Should().BeEmpty({0});" ) ]
59+ [ AssertionDiagnostic ( "actual.Should().OnlyContain(x => !x.BooleanProperty{0});" ) ]
5960 [ Implemented ]
6061 public void CollectionShouldNotContainProperty_TestAnalyzer ( string assertion ) => VerifyCSharpDiagnostic < CollectionShouldNotContainPropertyAnalyzer > ( assertion ) ;
6162
@@ -65,7 +66,10 @@ public class CollectionTests
6566 newAssertion : "actual.Should().NotContain(x => x.BooleanProperty{0});" ) ]
6667 [ AssertionCodeFix (
6768 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});" ) ]
6973 [ Implemented ]
7074 public void CollectionShouldNotContainProperty_TestCodeFix ( string oldAssertion , string newAssertion ) => VerifyCSharpFix < CollectionShouldNotContainPropertyCodeFix , CollectionShouldNotContainPropertyAnalyzer > ( oldAssertion , newAssertion ) ;
7175
@@ -241,7 +245,7 @@ public class CollectionTests
241245 [ Implemented ]
242246 [ Ignore ( "Will be available in Fluent Assertions 5.0" ) ]
243247 public void CollectionShouldNotHaveSameCount_TestCodeFix ( string oldAssertion , string newAssertion ) => VerifyCSharpFix < CollectionShouldNotHaveSameCountCodeFix , CollectionShouldNotHaveSameCountAnalyzer > ( oldAssertion , newAssertion ) ;
244-
248+
245249 [ AssertionDataTestMethod ]
246250 [ AssertionDiagnostic ( "actual.Where(x => x.BooleanProperty).Should().HaveCount(1{0});" ) ]
247251 [ Implemented ]
@@ -253,19 +257,7 @@ public class CollectionTests
253257 newAssertion : "actual.Should().ContainSingle(x => x.BooleanProperty{0});" ) ]
254258 [ Implemented ]
255259 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+
269261 [ AssertionDataTestMethod ]
270262 [ AssertionDiagnostic ( "actual.Should().NotBeNull().And.NotBeEmpty({0});" ) ]
271263 [ NotImplemented ]
@@ -280,40 +272,36 @@ public class CollectionTests
280272
281273 [ AssertionDataTestMethod ]
282274 [ 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 ]
284281 public void CollectionShouldHaveElementAt_TestAnalyzer ( string assertion ) => VerifyCSharpDiagnostic < CollectionShouldHaveElementAtAnalyzer > ( assertion ) ;
285282
286283 [ AssertionDataTestMethod ]
287284 [ 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});" ) ]
299287 [ 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});" ) ]
311290 [ 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+
317305 [ AssertionDataTestMethod ]
318306 [ AssertionDiagnostic ( "actual.OrderBy(x => x.BooleanProperty).Should().Equal(actual{0});" ) ]
319307 [ Implemented ]
0 commit comments