我已经按照这个建议来调试NUnit测试.
http://www.blackwasp.co.uk/NUnitCSharpExpress.aspx
但是,我有几个测试Assert.Throws<...>,这会导致调试器在我正在测试的异常发生时中断,当我真的希望它在这些调用之外发生异常时中断.
如何让调试器忽略这些方法中引起的异常?
编辑:我的事件尝试了下面,这是行不通的!
[Test]
public void InstanciatingWithNullParameterThrowsException()
{
try
{
Assert.Throws<ArgumentNullException>(() => new CachedStreamingEnumerable<int>(null));
// This still throws and stops be being able to debug tests called after this one
}
catch
{
}
}
Run Code Online (Sandbox Code Playgroud)