using NUnit.Framework; [TestFixture] public class ThrowsWithShouldTests { [Test] public void ExpectsExceptionWithFluentAssert() { var ex = Assert.Throws(() => DoThing()); ex.Should().BeOfType(); } private void DoThing() => throw new System.Exception(); }