File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed
src/FluentAssertions.Analyzers.Tests/Tips Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -26,13 +26,24 @@ public void PropertyOfIndexerShouldBe_ShouldNotThrowException()
2626 }
2727
2828 [ TestMethod ]
29- [ NotImplemented ( Reason = "https://github.com/fluentassertions/fluentassertions.analyzers/issues/13" ) ]
29+ [ Implemented ( Reason = "https://github.com/fluentassertions/fluentassertions.analyzers/issues/13" ) ]
3030 public void PropertyOfElementAtShouldBe_ShouldNotTriggerDiagnostic ( )
3131 {
3232 const string assertion = "actual.ElementAt(0).Message.Should().Be(\" test\" );" ;
3333 var source = GenerateCode . EnumerableCodeBlockAssertion ( assertion ) ;
3434
3535 DiagnosticVerifier . VerifyCSharpDiagnosticUsingAllAnalyzers ( source ) ;
3636 }
37+
38+ [ TestMethod ]
39+ [ Implemented ( Reason = "https://github.com/fluentassertions/fluentassertions.analyzers/issues/10" ) ]
40+ public void NestedAssertions_ShouldNotTrigger ( )
41+ {
42+ const string declaration = "var nestedList = new List<List<int>>();" ;
43+ const string assertion = "nestedList.Should().NotBeNull().And.ContainSingle().Which.Should().NotBeEmpty();" ;
44+ var source = GenerateCode . EnumerableCodeBlockAssertion ( declaration + assertion ) ;
45+
46+ DiagnosticVerifier . VerifyCSharpDiagnosticUsingAllAnalyzers ( source ) ;
47+ }
3748 }
3849}
You can’t perform that action at this time.
0 commit comments