📅  最后修改于: 2022-03-11 14:49:17.534000             🧑  作者: Mango
ExpectedException ex = Assert.Throws(() => methodToTest());
Assert.AreEqual( "Expected message text.", ex.Message );
Assert.AreEqual( 5, ex.SomeNumber);