我只是在寻找一些使用Assert.Catch或Assert.Throws来断言单元测试中抛出的异常的例子.我知道我也可以使用ExpectedException,但我很想知道"Catch"和"Throws"之间的区别.谢谢!
c# nunit unit-testing
c# ×1
nunit ×1
unit-testing ×1