using NUnit.Framework; [TestFixture] public class ThrowsThenAssertTests { [Test] public void ExpectsExceptionThenAsserts() { var ex = Assert.Throws(() => DoThing()); Assert.That(ex.Message, Does.Contain("error")); } private void DoThing() { throw new System.Exception("error"); } }