Skip to content

Commit 3e79299

Browse files
committed
added another sanity test
1 parent 41adebe commit 3e79299

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

src/FluentAssertions.Analyzers.Tests/Tips/SanityTests.cs

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff 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
}

0 commit comments

Comments
 (0)