Back to Nunit

Assert.DoesNotThrow

docs/articles/nunit/writing-tests/assertions/classic-assertions/Assert.DoesNotThrow.md

latest473 B
Original Source

Assert.DoesNotThrow

Assert.DoesNotThrow verifies that the delegate provided as an argument does not throw an exception. See Assert.DoesNotThrowAsync for asynchronous code.

csharp
void Assert.DoesNotThrow(TestDelegate code);
void Assert.DoesNotThrow(TestDelegate code,
                         string message, params object[] params);

See Also