Fluentassertions has some quite common usages of nested assertions, e.g.:
[Fact]
public async Task ShouldApplyCodeFixInNestedExceptionWithMessageCheck() => await Verifier
.VerifyCodeFixAsync(
"""
using System;
using aweXpect;
using FluentAssertions;
using Xunit;
public class MyClass
{
[Fact]
public void MyTest()
{
Action subject = () => {};
[|subject.Should().Throw<NullReferenceException>()
.WithMessage("foo*")|];
}
}
""",
"""
using System;
using aweXpect;
using FluentAssertions;
using Xunit;
public class MyClass
{
[Fact)]
public void MyTest()
{
Action subject = () => {};
Expect.That(subject).Throws<NullReferenceException>().WithMessage("foo*").AsWildcard();
}
}
"""
);
Fluentassertions has some quite common usages of nested assertions, e.g.: