nunit throws message
[Test]
public void TestException()
{
MyException ex = Assert.Throws<MyException>(
delegate { throw new MyException("message", 42); });
Assert.That(ex.Message, Is.EqualTo("message"));
Assert.That(ex.MyParam, Is.EqualTo(42));
}