79422519

Date: 2025-02-08 02:05:21
Score: 1
Natty:
Report link

I prefer to use Assert.Catch() in that case:

var exception = Assert.Catch(() => It.Throws()).InnerException;
Assert.That(exception, Is.TypeOf<CustomException>());
Reasons:
  • Low length (1):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Gucu112