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()
26
26
}
27
27
28
28
[ TestMethod ]
29
- [ NotImplemented ( Reason = "https://github.com/fluentassertions/fluentassertions.analyzers/issues/13" ) ]
29
+ [ Implemented ( Reason = "https://github.com/fluentassertions/fluentassertions.analyzers/issues/13" ) ]
30
30
public void PropertyOfElementAtShouldBe_ShouldNotTriggerDiagnostic ( )
31
31
{
32
32
const string assertion = "actual.ElementAt(0).Message.Should().Be(\" test\" );" ;
33
33
var source = GenerateCode . EnumerableCodeBlockAssertion ( assertion ) ;
34
34
35
35
DiagnosticVerifier . VerifyCSharpDiagnosticUsingAllAnalyzers ( source ) ;
36
36
}
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
+ }
37
48
}
38
49
}
You can’t perform that action at this time.
0 commit comments